Presenting totals across a text field in a report

P

PiersC

I have a simple table that contains FirstName, LastName and AgeType where
AgeType is either ADULT or CHILD.
I want to generate a report that prints postcard labels containing the above
details for selected records.

Finally, I 'd like to show the total number of ADULTs and CHILDren in the
report footer. However, I just can't find a way to do this. It seems like a
common enough requirement but all the samples on totals tend to talk about
numeric fields.

Any suggestions?
 
C

c_smithwick

PiersC said:
I have a simple table that contains FirstName, LastName and AgeType where
AgeType is either ADULT or CHILD.
I want to generate a report that prints postcard labels containing the above
details for selected records.

Finally, I 'd like to show the total number of ADULTs and CHILDren in the
report footer. However, I just can't find a way to do this. It seems like a
common enough requirement but all the samples on totals tend to talk about
numeric fields.

Any suggestions?

Assuming your data table is named "tblData", base your report on the
following query and create a text box in your footer with the "AdultCount"
and "ChildCount" data fields as their source:

SELECT tblData.FirstName, tblData.LastName, tblData.Type, DCount("Type",
"tblData","Type = 'ADULT'") AS AdultsCount, DCount("Type","tblData","Type =
'CHILD'") AS ChildCount FROM tblData
 

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