Syntax for criterion

MikeJD

New member
Local time
Today, 10:23
Joined
Mar 8, 2002
Messages
9
I have a query which takes information from an input form. On the form is a combo box based on a table with 3 fields - ID, Division, Criterion. To select records for a particular division, the 'Division' is selected in the combo box but I want the 'Criteron' field to be used in the query. The criterion box in the query is set as 'Forms![Input Form]![Division].[Column](2)' and the entries in the 'Criterion' field are in the form 'Like P*'. When I run the query I get an error message which says 'Undefined expression Forms![Input Form]![Division].[Column]'.

Can anyone suggest where I am going wrong ?
 
Put an unbound, hidden text box on your form. In the after Update event of the combo box set the hidden text box value to column 2. Refer to the text box in your query instead of the code you are using now.
 
I have added a hidden textbox and revised the criterion in the query as you have suggested. It now works a required.
Many thanks.
 

Users who are viewing this thread

Back
Top Bottom