Printing Specific Records

G

Guest

Hi Folks!

I am trying to print a report based on a database we are constructing. We
have a filter in place to select records that are "not reviewed" (an option
we can select). The filter goes off fine giving X number of records out of
several hundred. Now how do I make these X amount print through a report?
Currently they all print. As the database grows so too does the list of
reports.

Help!
Cory
 
A

Albert D. Kallal

You don't mention how that filter is being created.

However, a filter is in fact just a standard sql "where" clause.

So, just open the report using the "where" clause.

In fact, you can consider using the filter option of the OpenReprot also.
Which one you use is going to depend on how the forms filter was/is being
created.

However, you can go:

strWhere = "City = 'Edmonton' "

docmd.OpenReport "yourReport",acViewPreview,,strWhere

You can also usually just pass the current forms filter also....

strWhere = me.Filter

docmd.OpenReport "yourReport",acViewPreview,,strWhere

If you use the "where" clause, then you don't have to modify the sql, or the
report each time you need a different criteria. In fact, you generally will
wind up making some nice report prompt form. Here is some screen shots that
use the above "where" clause idea:

http://www.members.shaw.ca/AlbertKallal/ridesrpt/ridesrpt.html

The idea here is to present a nice interface for the user, and as a
developer for each different criteria, you don't have to make a new report,
or modify the sql for the report..
 

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