Open query with criteria on current form

charlie442

Registered User.
Local time
Today, 02:54
Joined
Jan 14, 2011
Messages
53
Hello learned ones,

I have a form which staff will use to complete their client profiles. To assist them in this endeavour I want them to be able to pull up queries which I have built into the database and whose criteria would be the Client_ID on the form they are currently viewing/editing. (I have embedded the macro to open said query when user clicks on the label of the particular field they are capturing.)
For the criteria in the Client_ID field of the query I have tried

[Forms]![Frm_Profiles]![Client_ID]

&

[Me]![Form]![Client_ID]

and various combinations thereof but when I click the label I am getting a run-time error 3070 - MS Office Access Database does not recognize the above as a valid field name or expression. This is quite confounding as it clearly is a valid field name.

Is there something obvious that I am overlooking here

Thanks
Confused:confused:
 
In criteria put.
[Forms]![frmName]![fieldName]
 
In criteria put.
[Forms]![frmName]![fieldName]


Is there any way to substitute a pointer to the current form instead of actually entering the name?

Thanks!
 
Not unless you reference a function that references the current form.
 

Users who are viewing this thread

Back
Top Bottom