Thank you Jiri! How do I go about adding that? I've really only done code on forms, so I'm not sure where to even put it.
I am just showing you a method of how to do an autobackup. You need to do a bunch of things if you want to adapt this to your environment.
1)create a simple table with one record. In the example it is called tblZ. It has three fields, zBUflag that prevents duplicate processing, zNextBU which is a string holding the time stamp of of next backup, and zBUinterval which determines the minutes between backups.
2) You need to have a form that stays on throughout the session. You can hide it. That form would have an OnTimer sub that runs say every three minutes. The timer sub would call the AutoBackup routine. The Autbackup checks the timestamp for the next backup and if it is past, it executes the backup (the backup itself has a timestamp in its filename). Then it resets the clock for the next backup.
3) You need to work out where you are going to store the backup files: the srcepath is your prod database, destpath is your storage area where you are placing your backups.
4) Since you are working with dependencies (inserts into junction tables) I recommend throwing the zBUflag (=True), to stop the backup from executing from the start of the record updates (Form's Before_Update) to the finish of the inserts. Then you can clear it again. That way you ensure against the slight possibility that someone was in the middle of saving the tables when autobackup hit in an inconsistent state. In most cases, the "Filecopy" would fail if the database was busy but you never know. Remember, this code executes inside several machines in parallel addressing the same database.
Good luck,
Jiri