Setting criteria in a Query at runtime

S

Steve

I have created a form bound to a query that displays as a datasheet. The
query has a field called 'Vendor_Id' and I would like to use a combo box to
set the criteria property of that field at runtime. Can you help me with the
code? Thanks
Steve
 
T

tina

in the query criteria, you need to reference the combo box, from whatever
form the combo box is on, as

Forms!FormName!ComboBoxName

substitute the correct name of the form and the combo box control, of
course. make sure the form remains open while the query-based form opens, so
that the combo box control is available to the query.

hth
 
Top