Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tabbed page reference

Status
Not open for further replies.

romeerome368

Programmer
Oct 12, 2010
35
US
Hello All,

I have a tabbed form, and there is a combo box on Page1 using Access 2007. I want this combo box to be a filter for a query and return data to a list box on Page1, but my reference to my combo box is not working.

I'm not quite sure how the syntax needs to be entered in the criteria area of the query.

For a normal form, the syntax would be [Forms]![formname]![control], but I'm not sure about tabbed forms.

HELP please!!!!

Any help is greatly appreciated.
 
Hello Duane,

Thanks for solidifying that I'm not going crazy, but for some strange reason Access does not like the syntax. Below is the error message that I am getting when I try to run the query.

The Microsoft Access Database engines does not recognize [Forms]![frmDataSrch]![PC] as a valid field name or expression.

Is there a reference that I need to have selected for the syntax to be recognized by Access?
 
please forgive the smiley. It came up when I used the [ P C ] as my field name. I know that the brackets need to be there, but for this exercise in the forum, I am going to leave them off to eliminate the smiley.

Forms!frmDataSrch!PC
 
Yes, Duane the control is named PC, and it is on the main form as a combo box. Not on an open form, and when the query is running the form is open.

That's why I'm so confused. I have been doing this for the past 12-15 years, and I know it should work. I'm thinking it's something different in Access 2007 that's causing this to happen. That's why I asked about references. Maybe I need to select a reference in order for it to be able to access the forms and the controls on them.
 
I meant to say that it wasn't on a subform, not "Not on an open form", but yes, the form is open when the query is running.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top