Can Parameters Appear in a Drop Down Box? (1 Viewer)

JenniferF

New member
Local time
Today, 19:36
Joined
Sep 12, 2000
Messages
5
I need to generate reports that have the ability to be filtered by what a user selects in a drop down box.

Is it possible to specify the parameters available to users (for multiple parameters) in a drop down box, instead of them typing it in?

I'm sure this is in reference material somewhere, but I have not been able to locate it.

Thanks In Advance,
Jenn
 

Jack Cowley

Registered User.
Local time
Today, 19:36
Joined
Aug 7, 2000
Messages
2,639
In the Criteria field of the query refer to the Combo box on the form like this:

[Forms]![YourFormName]![ComboBoxName].Column(x)

Replace the 'x' in the Column number with the column that contains the data that you want the query to use and remember that Access counts the Columns starting at 0 (zero).

HTH,
Jack
 

JenniferF

New member
Local time
Today, 19:36
Joined
Sep 12, 2000
Messages
5
Jack,

Thank you for your help.

One more question - Is there a way that the user can select more than one criterion in the combo box?

Thanks,
Jenn
 

Jack Cowley

Registered User.
Local time
Today, 19:36
Joined
Aug 7, 2000
Messages
2,639
Jenn -

You can only select one item from a Combo box. To select multiple items you will need to use a List Box. If you want to pass multiple criteria to a query then let me know and I will send you an article that will show you how to do that.

HTH,
Jack
 

Jack Cowley

Registered User.
Local time
Today, 19:36
Joined
Aug 7, 2000
Messages
2,639
Jenn -

This article will show you how to prompt the user to enter multiple criteria. You will need to save the multiple selections made in the list box to a hidden text field on the form. Then the InParam Code in Method 2 of this article can get the data from that hidden field and process the the query with multiple criteia. If you have trouble with this you can email me directly and I will try and assist you.
http://support.microsoft.com/support/kb/articles/Q100/1/31.asp?LN=EN-US&SD=gn&FR=0

HTH,
Jack
 

Jack Cowley

Registered User.
Local time
Today, 19:36
Joined
Aug 7, 2000
Messages
2,639
Jenn -

If you can not figure out how to do the multiple criteria let me know as I have a demo I can send you that will show you the way. Just send me an email....

Jack
 

Users who are viewing this thread

Top Bottom