Referring to a form field in the where clause

EHS

Registered User.
Local time
Yesterday, 17:58
Joined
Jun 23, 2011
Messages
22
I'm trying to construct an sql statement that will filter the contents of a field (from a query), based upon the contents of another field on the form. The statement works if I put a string in the where clause instead of the filter field name, but I don't know how to specify the field name in the where clause. Can anyone help?
Thanks
 
it's bound
 
In the Query criteria put;

[Forms]![FormName]![FieldName]
 
If it's bound you shouldn't be filtering the form based on that bound control.
 
Thanks vbaInet and MStef. [Forms]![FormName]![FieldName] in the query worked!
 

Users who are viewing this thread

Back
Top Bottom