Using a dropdown box in a query

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

Guest

I have a list of report names that are in a combo box. I would like to use
this combo box so that I can run a query off it. As in, everyone has say 10
reports so I want them to be able to click the "print report" button and a
drop down box will come up so they can choose their report and print it. Is
this possible? Thanks for your help in advance.
 
I have a list of report names that are in a combo box. I would like to use
this combo box so that I can run a query off it.
A combo box can be used as criteria in a query that is used to feed a
report. The criteria would be to select records from the table, not which
report to run.

An alternative is to have your "print report" button call a macro with
conditions. The conditions test what the combo box has selected and run the
matching report.
 
That seems like it should work, but what condition would I type in to get the
macro to perform that function? Thanks for your help.
 
Actually now that I think about it, the user does not select his report
before he/she clicks the "print" button, the "print" button is on the main
menu form because it is used for upper level managers to use to print off
certain reports of employees, so can you go more in depth on how to use the
combo box in query? Thanks.
 
To use the combo box in a query reference it like this --
[Forms]![YourFormName]![ComboBoxName]
 
The condition is a match to what is selected by the combo box.
[Forms]![YourFormName]![YourComboBoxName]="Best in show"
 
The drop down list contains a list of report names when I am on the form.
When I put the condition you stated in the criteria for report names, it asks
me to "enter the parameter value" so it is asking me to type in the report
name, I want the entire combo box to show up and be able to choose from it.
Thanks for all your help.

KARL DEWEY said:
To use the combo box in a query reference it like this --
[Forms]![YourFormName]![ComboBoxName]

--
KARL DEWEY
Build a little - Test a little


Nick said:
Actually now that I think about it, the user does not select his report
before he/she clicks the "print" button, the "print" button is on the main
menu form because it is used for upper level managers to use to print off
certain reports of employees, so can you go more in depth on how to use the
combo box in query? Thanks.
 
Anyone who can help it would be greatly appreciated. I would really like to
get this working. Thanks

KARL DEWEY said:
To use the combo box in a query reference it like this --
[Forms]![YourFormName]![ComboBoxName]

--
KARL DEWEY
Build a little - Test a little


Nick said:
Actually now that I think about it, the user does not select his report
before he/she clicks the "print" button, the "print" button is on the main
menu form because it is used for upper level managers to use to print off
certain reports of employees, so can you go more in depth on how to use the
combo box in query? Thanks.
 
You have to have the form open, select an item from the combobox, then run
the macro that has the condition.

--
KARL DEWEY
Build a little - Test a little


Nick said:
The drop down list contains a list of report names when I am on the form.
When I put the condition you stated in the criteria for report names, it asks
me to "enter the parameter value" so it is asking me to type in the report
name, I want the entire combo box to show up and be able to choose from it.
Thanks for all your help.

KARL DEWEY said:
To use the combo box in a query reference it like this --
[Forms]![YourFormName]![ComboBoxName]

--
KARL DEWEY
Build a little - Test a little


Nick said:
Actually now that I think about it, the user does not select his report
before he/she clicks the "print" button, the "print" button is on the main
menu form because it is used for upper level managers to use to print off
certain reports of employees, so can you go more in depth on how to use the
combo box in query? Thanks.

:

I have a list of report names that are in a combo box. I would like to use
this combo box so that I can run a query off it.
A combo box can be used as criteria in a query that is used to feed a
report. The criteria would be to select records from the table, not which
report to run.

An alternative is to have your "print report" button call a macro with
conditions. The conditions test what the combo box has selected and run the
matching report.

--
KARL DEWEY
Build a little - Test a little


:

I have a list of report names that are in a combo box. I would like to use
this combo box so that I can run a query off it. As in, everyone has say 10
reports so I want them to be able to click the "print report" button and a
drop down box will come up so they can choose their report and print it. Is
this possible? Thanks for your help in advance.
 

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