Referencing a control on a form page

Roni Sutton

Registered User.
Local time
Today, 17:18
Joined
Oct 18, 1999
Messages
68
I have a form that is split into tabs to look like index cards. I want to reference a control on that form for a calculation. However, I don't know the syntax. If I create an unbound box and set it's data property to:

=[forms]![frmName]![fieldname]

I get #Name in the unbound box. I have tried just setting the data property to the field name like this:

=[fieldname]

Still no dice. I am sure that I am supposed to reference which tab or page the field is on, but I can't get the syntax right. Can anyone help?

Thanks, Roni
 
Hmm, I just tested this and it worked.
I made a form with a tab control and put a txtbox (named txtNameID) in the first tab with the control source being [Name_ID] (whcih is from the table the form is based off of. Then in the second tab page i made a control box with the control source set to:
= [txtNameID] and it displayed the same thing as the txtbox on the first page. are you putting your info in the control source box?
 
THis is so weird. I have fought with this all morning. I KNOW I tried that and it didn't work. I finally deleted the unbound control box and based my form on a query that pulled the info in rather than using an unbound box with a dlookup as the control source (which didn't work originally, so that's when I just did the =[fieldname] which also didn't work). Anyway, I just put it back in and it works fine. I'm not sure what I was doing wrong initially, but thanks for the help!

Roni
 

Users who are viewing this thread

Back
Top Bottom