Selecting "All" in Report??

T

TotallyConfused

How do I select "all" and pass this on to my report to print so that it will
list all names. However, if I select only one name from list then my report
would only rint the selection. Any help will be greatly appreciated.
Thank you.
 
A

Allen Browne

Presumably you have a form where the user can enter the name (or choose from
a list), and possibly other critera as well, and then click a button to
OpenReport. The command button's Click event procedure will then build the
WhereCondition string so the report is filtered to the criteria chosen in
the form.

For a basic example of building such a WhereCondition, see:
Print the record in the form
at:
http://allenbrowne.com/casu-15.html
For a more comprehensive example, see:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

Once you have that working, you can write the code that builds the
WhereCondition so that it ignores the value "All".

If this is a combo or list box, and you don't know how to get "All" as a
choice in the combo, see:
Adding "All" to a listbox or combobox
at:
http://www.mvps.org/access/forms/frm0043.htm

An alternative might be to just tell the user to leave the criteria box if
they don't want to limit the report.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 

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

Top