Simple calculation returns #Name?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a form I want to multiply the contents of a price control by a quantity
control to get a total. My expression is:

=[Text35]*[Test37] where both text boxes contain nuimbers. Why does it
return #Name? and how do I fix this problem? Thanks.
 
You may need to check your spelling of our controls in your expression ...
Is "Test37" the correct name .. or should it be "Text37" ???

R. Hicks
 
I agree with Ricky... given the limited information about the fields. Where
the fields are located, and where you call the calculation from could
contribute to a #Name error.

I would add, that this is an example of why not to use "default" Access
names for your fields.

If your fields were named =[Price] * [Qty] the chances of a #Name error are
greatly reduced, and make your code easily understood by others.

hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
The issue here is not about fields. It appears from the post that these are
controls on a form. Assuming they are on the current form, just qualify the
names:
=Me.Text35 * Me.Text37
 
My guess is that the O.P. use the ControlSource row (in the Properties
window / DesignView of the Form) rather than VBA???

If this is the case. "Me" won't work as "Me" is only applicable in VBA code.

Generally, it is not necessary to qualify the ControlNames but if you want,
you can use:

= Form!Text35 * Form.Text37
 
Back
Top