Forum Discussion

EBriley's avatar
EBriley
Copper Contributor
Jun 25, 2020

Help on VBA Code to Activate Action Queries

Hello, 

 

I am creating an access database in which there are 3 tables: Current, Last, and Totals. I have created 3 action queries that will:

1. Append the total amount from a currency field in "Last" to the "Totals" table.

2. Delete all Records in "Last".

3. Append all Records from "Current" to "Last". 

 

I would like these action queries to activate on a monthly basis and was wondering if there is a way i could code the database to run the action queries automatically on a specified day of the month, or if the only way for this to happen is for them to be triggered manually by the user through a form?

  • EBriley 

    FYI, such an approach will lead to bloating.

     

    As for your question, you could create a macro, and then create a Windows Scheduled Task that runs the /x command line switch to run the macro on the given day/time of your choosing.

     

Resources