How to Count Records from a Field in a Report Form

T

TomP

I have a dbase with many fields with dates. One field is a text field and
will only accept certain 2 character alpha characters such as MA, NA, SA,
etc...

What I need is a report of that one field which will only give me a number
total of each group of characters (MA's, NA's, etc...) and finally a grand
total.

Thank you for your help!
 
M

Marshall Barton

TomP said:
I have a dbase with many fields with dates. One field is a text field and
will only accept certain 2 character alpha characters such as MA, NA, SA,
etc...

What I need is a report of that one field which will only give me a number
total of each group of characters (MA's, NA's, etc...) and finally a grand
total.


First create a query that calculates the totals. This is
very easy using the View - Totals menu item (or the Totals
tool bar button). Drag the text field down to the query's
field list. It should then have Group By in the Totals row.

Drag the same field down to the next column of the design
grid and select Count in the totals row.

When you switch the query to sheet view, you should see all
the individual totals.

Use that query as the record source for your report. Put
the two query fields in text boxes in the detauil section.
In the report footer section add a text box from the tool
box tool bar and set it to an expression lik
=Sum([the CountOf... field])
 
T

TomP

It worked! Thank you for your help!

Marshall Barton said:
TomP said:
I have a dbase with many fields with dates. One field is a text field and
will only accept certain 2 character alpha characters such as MA, NA, SA,
etc...

What I need is a report of that one field which will only give me a number
total of each group of characters (MA's, NA's, etc...) and finally a grand
total.


First create a query that calculates the totals. This is
very easy using the View - Totals menu item (or the Totals
tool bar button). Drag the text field down to the query's
field list. It should then have Group By in the Totals row.

Drag the same field down to the next column of the design
grid and select Count in the totals row.

When you switch the query to sheet view, you should see all
the individual totals.

Use that query as the record source for your report. Put
the two query fields in text boxes in the detauil section.
In the report footer section add a text box from the tool
box tool bar and set it to an expression lik
=Sum([the CountOf... field])
 

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