Discussion Locked

Access 97 Help

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm an Access newbie with no VB or SQL knowledge. However I'm a pretty quick study and have be able to teach myself the basics of Access 97, but there is one thing I can't quite wrap my mind around. I need to be able to display Month to Date information for a particular date in a query. I enter daily information and can easily display a total for that information for a particualr month by using the "group by" and "sum" on the total lines of my select query, but how do I get a running MTD total by day?

3 replies

by ktirf

I assume that we have a table "Table_Name" with columns ID, VALUE, DATE. Hope you'll make it even if the date is not in one field; if not, mail me. Anyway, if you want to make a total for a month you use "Sum(VALUE)" with "group by Month(DATE)" or kinda, yeah? Now, to obtain a running total, fill the field reserved for it with something like this:
DSum("VALUE", "Table_Name", "DATE Between " & DATE & " And " & DateAdd("m", -1, DATE))
Do you see? You use the current date and the date a month earlier to determine the recordset you need a running sum of. And then you use DSum function to sum all this!

I must confess I did not try it, but I believe it works. Cheers!

by jay aldous

This answer didn't get me exactly where I needed to be, but it definately pointed me in the right direction. Thanks for your assistance.

This discussion is closed to new replies.