How To Create a List Box for Parameter Filters in Access Queries

G

Guest

In Access, "Parameter Queries" are great for those queries you use multiple
times with only a change in the filter criteria or value. There has got to
be a way to put a list box in the place of the "Enter Parameter Value" box
that is generated when the query is first run. I want to make it easy to
remember the "approved selection" for the query field filter. Anyone know
how to do it?

Thanks in advance.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...c674d1e279&dg=microsoft.public.access.queries
 
J

John Spencer

You need to use a combobox on a form to feed the query.

Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm


A brief quote from an John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with
a Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form
or report, the user can enter the criterion and view the results in one
simple operation!

Quoting John Vinson
 

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

Top