Access 2007 time based deletion

mulhearn22

New member
Local time
Today, 15:06
Joined
Oct 11, 2007
Messages
1
Hey!

I need my Access DB to automatically delete records on every Wednesday. Any idea how to do this? It's on a running server.

TIA
Matt
 
Use the On Timer event, executed hourly, of your main switchboard to check the day of the month, if a Wednesday, delete the requisite records.

I say execute the event hourly, maybe more frequently, because who knows when the program will be opened. Also keep a log of to veryiof when last deleted so that only one deletion a week occurs.

The frequent testing is insignificant time wise.
 
Create a query contains only records you want to delete. Run it and check the result.

The create a delete query, copy paste the SQL created in the last query then run it.

Use Day() function to get name of the day.

---------

Sorry, I misinterprete your question. There is no good way to run a background program in Access. You can try write some code in AUTOEXEC module. That module will load during start up. Create a hidden form with a timer control.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom