Form Criteria for Query to generate Report

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

I have created a form that feeds a query, and automatically generates a
report based on the choices I've made on the form.

The form contains a few combo boxes that offer all of the available (for
example) categories, countries, Reps, etc.

Everything works fine, however there is a little glitch. I have to select a
field from the combo box. If I leave it blank then I get no data.
So, If I want to view all of the countries or all of the customers, I
can't - I have to select a specific one from the drop down list.

Is there a wild card or value that I can input in the drop down box that
will allow me to view everything (all of the categories or all of the
countries)?.

Thanks in advance
Pete
 
set the criteria in the query's country (for instance) field to

[Forms]![FormName]![ComboBoxName] Or [Forms]![FormName]![ComboBoxName] Is
Null

the above goes all on one criteria line in the query design grid; and
substitute the correct form name and combo box control name, of course.
repeat the syntax for each criteria that refers to a control on the form.

hth
 
Back
Top