Is Dsum the best way to get mtd totals in a query? I have weekly sales totals by city and state. I would need a MTD total for each city/state combination. How do you write the criteria for the date piece of MTD?
Is Dsum the best way to get mtd totals in a query? I have weekly sales totals by city and state. I would need a MTD total for each city/state combination. How do you write the criteria for the date piece of MTD?
I would have a form, say frmRpts. On it have 2 text boxes for dates: txtStartDate, txtEndDate.
Then the query would read the boxes for criteria...
select * from table where [DateEvent] between forms!frmRpts!txtSTartDate and forms!frmRpts!txtEndDate
This is your base query to use for other queries or reports.
I have speed buttons to set Month, Day, Yearly...
but you can enter the dates manually too.