Count records in printout

D

danc09

Using A97, I need to count the patients on a listing, with two exceptions.
They are not counted if they are 'In Hospital' (a Yes/No field). They are not
counted if the same name appears on a second line (the patient has more than
one entry). Here is an example of how the report should look.
1 Albert Product used ...
2 Carr Product used...
Carr Product used... Not added because it is the
same patient
3 Ralph Product used...
Fred Product used... Not added due to in hospital
4 Alfred Product used...
Thank you for any help.
Dan
 
A

Allen Browne

1. In the Sorting and Grouping, choose the PatientID field, and turn on the
Group Footer section. Access will add a new section to the report for the
PatientID Group Footer.

2. In this section, add a text box and set these properties:
Control Source =IIf([In Hospital], 0, 1)
Running Sum Over All
Format General Number
Name txtPatientCountRS

3. In the Report Footer section, add a text box and set its Control Source
to:
=[txtPatientCountRS]

4. (Optional) Set the Visible property of the new PatientID Group Section to
No, so it does not take up any space on your 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