Using a multiplication function in a form

vnfoster

Registered User.
Local time
Today, 08:13
Joined
Sep 16, 2009
Messages
30
I am probably overthinking this, but I am doing a form where about 50% of my entries will need to be converted from grams to pounds for a later report.

Right now I am trying to use a unbound text box in the form using [weight] * [.00220462262] on the "on click" command, however when I try to run it is giving me an error. I know I am probably missing something simple and stupid, but any help would be greatly appreciated. :(
 
It would help to see the actual code, but you wouldn't want the numeric value bracketed. Access will think that's a field name.
 
I am using the expression builder in the text box properties, instead of writing the VBA code
 
That wouldn't work if it's on the "on click" line. You need a macro or VBA code to set the value. A control source of

=[weight] * .00220462262

should also work, though it sounds like you don't want it for all records.
 

Users who are viewing this thread

Back
Top Bottom