Greetings:
I have a form within a subform. I am trying to write an IIf statement that will set a textbox to a certain value if a certain condition is true. This works just fine when I do not have a subform and am only working with a mainform. But when I have a subform within a form, it does not work but returns an error in the textbox "#NAME".
From the main form, I have a calculated field called Text101. It performs the calculation perfectly and the result is formatted as a number. Now, in the subform, I have a field called Text102 which holds the equation =[Forms]![MainForm]![text101]. The purpose of this equation is to place the result of the calculation on both the mainform and the subform. This also works perfectly. But now, I would like to use an IIf statement in the Subform. The same IIf statement works perfectly on a stand-alone form, but I must do it like this. This is the equation that I am using:
If([text102]='Adult','OK','Not OK') this returns an #ERROR. Can someone please help me??
Thank you,
Joe
I have a form within a subform. I am trying to write an IIf statement that will set a textbox to a certain value if a certain condition is true. This works just fine when I do not have a subform and am only working with a mainform. But when I have a subform within a form, it does not work but returns an error in the textbox "#NAME".
From the main form, I have a calculated field called Text101. It performs the calculation perfectly and the result is formatted as a number. Now, in the subform, I have a field called Text102 which holds the equation =[Forms]![MainForm]![text101]. The purpose of this equation is to place the result of the calculation on both the mainform and the subform. This also works perfectly. But now, I would like to use an IIf statement in the Subform. The same IIf statement works perfectly on a stand-alone form, but I must do it like this. This is the equation that I am using:
If([text102]='Adult','OK','Not OK') this returns an #ERROR. Can someone please help me??
Thank you,
Joe