I have a subform that I need to perform a calculation in. One of the objects to be calcualted is a field, and the other is a text box. I set up a third text box to perform the calculation in its control source.
It looks like this:
Control Source: =[SmSoda]*[SmSodaPrice]
SmSoda is a field and SmSodaPrice is the text box.
All the formats are the same...general number. I keep getting the #Name error. If I use two fields on that subform to multiply, I don't get an error. It seems to be wrong only if I use the text box object in the calculation.
I've tried the same thing on my main form and everything works fine. So, I've narrowed it down to the subform not being able to recognize the text box within itself.
I've also tried using:
=Forms![Drinks Subform1].[SmSodaPrice] * [SmSoda]
and that didn't work either.
Any ideas as to why and how to solve this? I'm trying to avoid setting up more macros or adding more fields in order to get this done.
Thanks,
Stacey
It looks like this:
Control Source: =[SmSoda]*[SmSodaPrice]
SmSoda is a field and SmSodaPrice is the text box.
All the formats are the same...general number. I keep getting the #Name error. If I use two fields on that subform to multiply, I don't get an error. It seems to be wrong only if I use the text box object in the calculation.
I've tried the same thing on my main form and everything works fine. So, I've narrowed it down to the subform not being able to recognize the text box within itself.
I've also tried using:
=Forms![Drinks Subform1].[SmSodaPrice] * [SmSoda]
and that didn't work either.
Any ideas as to why and how to solve this? I'm trying to avoid setting up more macros or adding more fields in order to get this done.
Thanks,
Stacey