Neither... Try again by double clicking on text1 and text2...
Good Luck
Printable View
Neither... Try again by double clicking on text1 and text2...
Good Luck
This should result in
Why do you consider putting Text2.Text into the parameter of the change event????Code:Private Sub Text1_Change()
Text3.Text = CStr(Val(Text1.Text) * Val(Text2.Text))
End Sub
AND
Private Sub Text2_Change()
Text3.Text = CStr(Val(Text1.Text) * Val(Text2.Text))
End Sub
It seems you have not fully understood the concept of the events and their parameters...
Many2 Thanks for helping me in my project.
Their is one more question?
Can we convert Text3.Text in roundup value for example
Text3.Text = CStr(Val(Text1.Text) * Val(Text2.Text)) = OK this is coding for calculation. But after doing so it gives in decimals. i.e
Text1.Text = 52 and Text2.Text = .65 it gives 33.8 in Text3.Text
How can I round up 33.8 to 34.00?
Press F1 for HELP, or SEARCH for VB6 ROUND()
Round Function
Quote:
Description
Returns a number rounded to a specified number of decimal places.
Syntax
Round(expression [,numdecimalplaces])
The Round function syntax has these parts:
Part Description
expression Required.Numeric expression being rounded.
numdecimalplaces Optional. Number indicating how many places to the right of the decimal are included in the rounding. If omitted, integers are returned by the Round function.
Thanks you Sir.
Got it.
Thanks again.
One more question?
How can i link my Access file in forms.
or you can say I want to save my files through programming in access file. So that i can store data and collect information from Access.
Now that this question has been solved you should mark this thread as such and post this question into a new thread as it is unrelated to the original question but for a simple answer use the data form wizard to connect your program to access...
Good Luck