View Full Version : month
darkrider
03-05-2007, 05:02 PM
does any one know how i can convert year to month.
would it be
textbox*12
so if user enters 2 then *12 = 24 months is that correct
and how would i do the coding for this
geekgirlau
03-05-2007, 08:08 PM
What is it exactly that you're trying to do? Where are users entering the "2"?
If possible, please attach a small, sanitised version of your file so that we can see what you're after.
darkrider
03-05-2007, 10:00 PM
What is it exactly that you're trying to do? Where are users entering the "2"?
If possible, please attach a small, sanitised version of your file so that we can see what you're after.
well a user will enter numbers, which maximum will be up to 30 in a text box.
how could i make that textbox be equal to a month so examlpe if user enters 2 then that is equal to 24 months etc..
mdmackillop
03-06-2007, 12:59 AM
You mean that you want the textbox he enters 2 into, to change to 24 automatically? If so,
Private Sub TextBox1_AfterUpdate()
Me.TextBox1 = Me.TextBox1.Value * 12
End Sub
darkrider
03-06-2007, 01:25 AM
basically there is two textbox.
textbox one is for user to enter a value and second textbox is for user to enter years.
and the output would be calculated and output would be done in monthly.
so 10*2 = 20 / 24months = 0.84
mdmackillop
03-06-2007, 01:55 AM
And where does the result go?
Bob Phillips
03-06-2007, 02:03 AM
Haven't we done this before?
Me.TextBox3.Text = Format(CDbl(TextBox1.Text) * CDbl(TextBox2.Text) / 24, "#,##0.00")
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.