Setting criteria in a Query at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top