report based on select query



I have a report that uses a query. The query selects records based on the
"date" field. All records have the following fields: Name, ID, Date,
Amount, Record Type.
The report groups the two record types for each Name and totals on each
record type. I want to sum all of the record type = C and record type = P in
the report footer. I have tested the report when the query reads all of the
records with a Dsum statement and the totals for record type = C and record
type = P and the correct totals are returned. However, when I insert the
record selection criteria in the underlying query for the report, an 'error'
is returned.

Can you tell me what I am doing wrong ?




Duane Hookom

First, Name and date are reserved words and should not be used as field
names. Next, when you state "total" and "sum", you should tell us which field
needs to be totaled. I assume it is the [Amount] field.

You can find the sum of all the [Amount] values where [Record Type] = "C"
with a Control Source like:
=Sum(Abs([Record Type] = "C") * [Amount])
This expression can be use in Report and Group Headers and Footers.

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