Selecting what to send to report

rhay

Registered User.
Local time
Today, 21:05
Joined
Mar 30, 2001
Messages
24
I have a combobox that is filled from a table field. There could possibly be several records associated with this field.

I want the user to be able to select one of the items in the drop down box then generate a report showing only the records related to that particular field.

However, I also want to give them the option to generate a report including all records.

Any help is appreciated.

Thanks,

Robert
 
On the Form_Load event of your form, make sure that the combobox is initialized to 0 or "" or Null (Is it a number or text data type?) so it appears blank - nothing is selected.

Then the criteria for that field in the underlying query for the report should be;
Like "*" & [forms]![YourFormName]![YourComboBoxName].

If the combo box remains blank with nothing selected, all records will be included in the query.

There are also instructions in the Solutions.mdb database (sample database that comes with Access) for how to make the first item in your combo box say "All". I've never used it though.

Hope that helps.
 

Users who are viewing this thread

Back
Top Bottom