Filter on a report from

G

Guest

I have a from that you can select a field to filter a report by. These
fields are comboxes. Can I have one report to filter this by? What do I put
into the report under filters to filter it by? Do I put the combox name or
what it is filter by? I have one report that can be run for 5 diffrent
comboxes that I want to filter on. When you do the filter you only will need
to filter on one of the five.
 
A

Al Campagna

Kat,
You don't really filter a report... you filter the query behind it.
Let's say you have a cboCity on your form, and you'd like to have it
filter for a certain City selected in the combo... or ALL cities if no entry
is made in the combo.

In the report query, use this criteria against your city field.
Like "*" & Forms!frmYourFormName!cboCity & "*"

If cboCity = "Boston", only Boston records will be delivered.
If cboCity is Null, All cities will be returned.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html
"Find a job that you love... and you'll never work a day in your life."
 

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

Similar Threads


Top