General discussion

Locked

Access 97 Help

By Jay Aldous ·
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?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 97 Help

by Ktirf In reply to Access 97 Help

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!

Collapse -

Access 97 Help

by Jay Aldous In reply to Access 97 Help

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.

Collapse -

Access 97 Help

by Jay Aldous In reply to Access 97 Help

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums