Filter on report?

kbrooks

Still learning
Local time
Today, 17:03
Joined
May 15, 2001
Messages
202
I've found many threads on how to filter on a form, I'm wondering if something similar is possible on a report.

Normally I do this by basing the report off a query, and using a parameter in the query. For example, the criteria on a date is >=[Enter Start Date]. It prompts the user for a date and uses that as the criteria.

My problem is that what I want to use as a criteria this time is based on a physician table. The only info on the record is the doctor number and doctor name. The person running the report will surely know the name, but not the number, and I've only gotten this to work by entering the number. I would love to have a drop down for them to select from...reduces the chance of misspelling the doctor's name, also.
 
I would just do a small form that pops up and has the combo box on it. Then the report uses it as a filter...

??
 
All you need to do is create a pop up form with a combo box to hold the doctors names and in your query under criteria put Forms![yourformname]![yourcomboboxname}
 
Thanks for your help so far! I'm still running into problems, and I assume it's something I typed incorrectly. I created a form named ChoosePhysician and the only thing on it is a combo box named DrComboBox that pulls a list of physicians from the Physician table.

In my query criteria, I type in Forms![ChoosePhysician]![DrComboBox] as you instructed, but when I leave the field, it puts brackets around Forms also. Is that a problem? I can't get it to NOT add the brackets. :confused:

When I run the query, instead of opening the form with the combo box, like I expected, it prompts for me to enter a Parameter Value
Forms!ChoosePhysician!DrComboBox


??? Any idea what I'm doing wrong? I've looked at the example DB you attached and can't see anything different than what I'm doing.
 

Users who are viewing this thread

Back
Top Bottom