+ Reply to Thread
Results 1 to 5 of 5

How to run a macro once a year/month

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    How to run a macro once a year/month

    Hi I working with access and would likea macro to to run a backup query once a month.
    Also I would like to execute an update query (with new year fields), once per year.

    both should run to check if it should execute everytime on open.

    Thoughts?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: How to run a macro once a year/month

    Look at this link. In the DateDif line, you will need to change the criteria to months and years.

    http://www.tek-tips.com/viewthread.cfm?qid=670401

    Here is a link on how to use DateDif

    http://www.techonthenet.com/access/f...e/datediff.php
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: How to run a macro once a year/month

    Looks great, I'll screw around with this. Appreciate it...

  4. #4
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: How to run a macro once a year/month

    Does the timer run for a year every time the databse is open? will the timer execute the macro if the database is not open during that exact time?

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: How to run a macro once a year/month

    http://www.bluemoosetech.com/microso...0Timer%20Event

    I think that you will have to add a scheduled Windows task to have it open and run Access for the events to take place. I personally have never done this. I think that a google search may be the most productive way to find a good answer for this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1