combo box in a query

  • Thread starter Thread starter anthony.carter
  • Start date Start date
A

anthony.carter

Hi,

Is it possible, do you think, to insert a combo box into the criteria
section of a query? The user of the query will have a lot of units to
choose from in the query and it would be easier for the user to have a
drop down box to make a selection from. Can this be inserted into the
query so that it appears and is functional when the query is run?

If so...how would a novice go about it?

Thanks,

Regards,

oic3120
 
Not directly, but you can enter a reference to a combo box as a parameter in
the query. Create an unbound form with a combo box on it which lists all the
possible values in order. Add a button to the form to open the query, or
better still to open a form or report based on the query.

In the criteria row of the relevant column in query design view enter a
reference to the combo box along the lines of:

Forms![YourFormName]![YourComboBoxName]

Instead of opening the query directly open the form, select a value from the
combo box's list and click the button to open the query/form/report.

You can of course have multiple controls on the same form as parameters for
different columns in the query, or as parameters for the same column if for
instance you wanted to define a date range by start and end dates.

Ken Sheridan
Stafford, England
 
Back
Top