Counting all records (including filtered out)

S

SusanV

Hi all,

I have a report which is filtered using a where clause based on form data
and user selection. In the report header, I have set fields for counts of
various items, which works fine. However, now users would ALSO like to see
the total count of all related records to the report, including those
filtered out by their option choices.

To be more specific, the report lists all records related to a certain type
of ship (filtered based on the form with the print report button on it).
Users filter out to see only those records where the review has been
started, or only those where the review is completed (filtered via the popup
box with the option group choices). They want to see the total number of
reviews for that type of vessel, as well as the total started, or completed
or whatever.

Is this possible?

TIA,

SusanV
 
R

Rick Brandt

SusanV said:
Hi all,

I have a report which is filtered using a where clause based on form
data and user selection. In the report header, I have set fields for
counts of various items, which works fine. However, now users would
ALSO like to see the total count of all related records to the
report, including those filtered out by their option choices.

To be more specific, the report lists all records related to a
certain type of ship (filtered based on the form with the print
report button on it). Users filter out to see only those records
where the review has been started, or only those where the review is
completed (filtered via the popup box with the option group choices).
They want to see the total number of reviews for that type of vessel,
as well as the total started, or completed or whatever.

Is this possible?

TIA,

SusanV

Use DCount() function. It works agaisnt whatever domain (table/query) you
specify in its arguments as opposed to Count() which only works against the
underlying RecordSource of the form/report where it is used.
 

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