Total from one source, equivalent percentage from another?

8

82412

This is probably simple but it's something I haven't had to do before.

I have a main table.
I have a filter query based on this table.
I have a report, based on the query, which displays the total number of
records in the query.
In the same report, I would like to display this total as a number (already
done, obviously) and also as a percentage of the total number of records in
the main table.

How would I go about this?
 
M

Marshall Barton

82412 said:
This is probably simple but it's something I haven't had to do before.

I have a main table.
I have a filter query based on this table.
I have a report, based on the query, which displays the total number of
records in the query.
In the same report, I would like to display this total as a number (already
done, obviously) and also as a percentage of the total number of records in
the main table.


Set the percentage text box's control source to an
expression like:
=totalfield / DCount("*", "main table")
and set the text box's Format to Percent
 
8

82412

That did it, thanks!

Marshall Barton said:
Set the percentage text box's control source to an
expression like:
=totalfield / DCount("*", "main table")
and set the text box's Format to Percent
 

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