• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

Dsum assistance (1 Viewer)


Registered User.
Local time
Today, 12:13
Sep 20, 2017

Looking for a Macro that looks up and sums the TTM (12 trailing months) of OPEX from a different table.

In the table Initiatives I need a macro that will look up and add the 12 trailing months of OPEX from the OPEX table based on the date that it is entered.

Also, if a future date is added, that the macro will select the first available month in the OPEX table to start the 12 month sum.




I’m here to help
Staff member
Local time
Today, 12:13
Oct 29, 2018
Hi. Can you show us what you have tried so far?

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:13
Feb 19, 2002
You would do this with a query. If the query always is for the current day back 12 months, the criteria can be calculated by the query. If you want to have some control over the range, use a form with either a start and and end date or just an end date and the start date can be calculated by the query. The criteria will be:

Where TranDate Between Forms!yourform!txtStartDT and Forms!yourform!txtEndDT

Users who are viewing this thread

Top Bottom