I have a couple of questons for you:
How do I assign a value that comes from a form and is inputed by the user to a double variable. Let's say I have a field in a form called number and I have declared a variable dim sample as double. I need to assign the value of the field to the variable in order to do some calculations that user need not to see.
I tried set sample = Me.Number, but it didn't work and displayed some sort of property type error.
My next question is, once I am done with the calculations I need to save the result in a table field. Again the user need not to see whats going on.
A complete example would be a form with two fields one called number1 and another one called number2 and a close button.
When the user provides values to both number1 and number2 and clicks the close button, before the form is closed I need to assign those two values to two variables, calculate, say their sum, which is assigned to another variable called results, and then the value of results is assign to a field in a table, say Table1, field1.
Once again this needs to be hidden from the user, so I am assuming that I have to do this as a VB Module.
Any suggestions???????
Thanks for your help.
filo
How do I assign a value that comes from a form and is inputed by the user to a double variable. Let's say I have a field in a form called number and I have declared a variable dim sample as double. I need to assign the value of the field to the variable in order to do some calculations that user need not to see.
I tried set sample = Me.Number, but it didn't work and displayed some sort of property type error.
My next question is, once I am done with the calculations I need to save the result in a table field. Again the user need not to see whats going on.
A complete example would be a form with two fields one called number1 and another one called number2 and a close button.
When the user provides values to both number1 and number2 and clicks the close button, before the form is closed I need to assign those two values to two variables, calculate, say their sum, which is assigned to another variable called results, and then the value of results is assign to a field in a table, say Table1, field1.
Once again this needs to be hidden from the user, so I am assuming that I have to do this as a VB Module.
Any suggestions???????
Thanks for your help.
filo