Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple questions about totals in reports.

Status
Not open for further replies.

kjspear

Programmer
Feb 13, 2002
173
US
Hello everyone,

I have a question about adding totals on reports. I know that the report is based on either a table or query. I have a grand total on the report footer. Normally, on one query let's say Seminar 101, 2/1/04, it will add up all the fees paid. But if I have different seminars like Seminar 102, 4/1/04, which is in the same table, that total is included also if the code it as =sum([fees]). How do I have Access prevent other totals from being included when I only need totals from Seminar 101, 2/1/04? I'm sure that's is something simple that I've overlooked.

Thanks
KJ
 
You say you have a 'grand total', so that's just what it is. A total of everything in the report.

We need more details on your report's recordsource and format.

Do you have a footer for each Seminar, with totals in each? How is your report grouped/sorted? Where are the footers and what is in each one?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hello,

Okay, the recordsource is a table named registration. This includes every person who ever registered for an event. The I do not have a footer for each seminar. It's not grouped but sorted alphabetically. So what I'm trying to do is isolate only the seminars dated 2/1/04 from the rest of the records not dated 2/1/04. The =sum{[grand]) is including everything in the underlying table.

Thank you
KJ
 
Even though you want to isolate the seminars dated 2/1/04, do you still want to display ALL the records from the table?

If so, you could always use DSUM:

=Dsum("Fee","Registration","RegistrationDate = #2/1/04#")

this will sum the field "FEE" that is in the table "Registration" but only for RegistrationDate of 2/1/04. You'd have to tweak to accomodate your own field names.

Is this something you want to be able to report different dates, or will it ALWAYS be for 2/1/04?

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Okay, I will try =Dsum. I'm only displaying certain records. The table will have different dates as their will be several seminars throughout the year. I will let you know of my status.

Thanks
KJ
 
Originally you said the RecordSource of your report was a table, and that ALL records were displayed, but that you only wanted to total certain ones. Your last post says you are only displaying certain records. So I'm not quite clear.....If you are only displaying the records that you want totalled, then the formula =sum(whatever) should work. However if you are displaying more records than what you want totalled, then you have to take other measures.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I changed it to a query. Something I should have done from the start. Now it works fine. Thanks and sorry for the confusion.

KJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top