Quick filter-criterium For Report

S

Steven Taub

What kind of data are you going to be filtering on? Are
they specific fields every time?
 
V

Van T. Dinh

One way to do this is to open a "Pre-Processor" Form when the user wants to
run a Report. On this Form, put a ComboBox (or ListBox) presenting the
easy-to-remember data on the AccountNos (e.g. full names rather than
AccountNo / abbreviated codes only) so that the user can select an AccountNo
via the full names. Remember to use the AccountNo as the BoundColumn of the
ComboBox / ListBox. Also, put 2 CommandButtons for previewing and printing
the Report, both using the OpenReport Method.

In the OpenReport Method, use the "wherecondition" argument to filter the
Report to the AccountNo selected in the ComboBox or ListBox. Alternatively,
you can base the Report on a Parameter Query with the full reference to the
ComboBox / ListBox as the Parameter.

Check Access VB Help on the OpenReport Method for the "wherecondition".
 
V

Van T. Dinh

I am not sure what you want but develop from the same concept. You can make
the "Pre-Processor" Form as complex as you need, e.g. TextBoxes for the user
to type in for certain text to be searched for, ComboBoxes and ListBoxes for
the user to select from limited set of values, etc ...

Of corse, the more the user specifies, the more complex the "wherecondition"
construction will become.

--
HTH
Van T. Dinh
MVP (Access)



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