General Understanding of Text Boxes, Numeric Fields

stoka

Getting Better
Local time
Today, 07:10
Joined
Jan 22, 2007
Messages
23
If I have a field in a table defined as a type number, and then in a form have a text box that displays that field, and have another contorl where i want to display some calcualtion based on many things using code for the calculation, do i need to convert the text box value to a number being applying math functions or is it already a number. do i use the control value as xyz.value or xyz.text ... so i guess i am asking is a conversion needed from the text box entry ( even if the table field is defined as a number ) and if so do i convert the .text or the .value ....thanks.:confused:
 
You should not need to convert it (and .Text is rarely necessary).
 
doesnt matter what you have. it will usually be

Me.txtbox = Cstr/CDec etc (calculation)

You dont need .value or .Text
 
Hello:
I have enclosed an example of one way this is done.

Regards
Mark
 

Attachments

As pbaldy said .Text is rarely necessary ! In order to use Whatever.Text, the control Whatever has to already have focus, whereas Whatever.Value can be used with or without Whatever having the focus. It's really much easier to simply use .Value all the time!
 
unless your using the afterupdate of a text box where i ran into trouble recently. it uses the before value..whereas .Text uses the current value.
 

Users who are viewing this thread

Back
Top Bottom