Results 1 to 3 of 3
  1. #1
    jmichaels is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    20

    MTD totals

    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?

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,473

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    8,799
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query detail totals vs. Summary Totals do not match?
    By aellistechsupport in forum Queries
    Replies: 9
    Last Post: 01-15-2016, 11:36 AM
  2. Similar to totals and Grand totals
    By Thompyt in forum Reports
    Replies: 14
    Last Post: 01-24-2015, 06:39 PM
  3. Unusual Sub Totals & Totals in Groups.
    By Robeen in forum Reports
    Replies: 12
    Last Post: 03-20-2012, 08:55 AM
  4. Replies: 5
    Last Post: 12-06-2011, 11:18 AM
  5. Month totals and Year totals
    By marksnwv in forum Access
    Replies: 1
    Last Post: 08-05-2011, 10:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums