Avatar of Gilberto Sanches
Gilberto Sanches
Flag for Suriname asked on

Options to automatically create backup of Access database

Dear experts,

What options are there in Access to automatically create a backup of the complete database at opening of the database or daily at a specific time? Preferably when the Access db is opened that a window asks the user if the user wants to create a backup of the database?
Microsoft OfficeDatabasesMicrosoft Access

Avatar of undefined
Last Comment
Gilberto Sanches

8/22/2022 - Mon
Daniel Pineault

If your db is split, you can at the startup, before a lock file is created on the back-end prompt the user.  If they confirm, then it is a simple filecopy.

You don't want to perform a backup while there exist a lock file.
Gilberto Sanches

ASKER
The database is the front end & back end. That is why I want to implement a automatic backup solution.

Filecopy, hmmm, I'll check that out
Daniel Pineault

You really should split your database.

As for FileCopy, see https://www.devhut.net/2010/09/29/ms-access-vba-copy-a-file/ for a function that includes some basic error trapping.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Gilberto Sanches

ASKER
Thanks Daniel for recommending the "Split Database" & the VBA file copy codes. I appreciate it
PatHartman

Copying a database that is currently open by some other user can lead to corruption.  Backups should happen when all users are out of the application.
ASKER CERTIFIED SOLUTION
John Tsioumpris

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Gilberto Sanches

ASKER
Good to know PatHartman.

As recommended, I created a split DB. I'll then schedule the backup after workhours. Thanks for the software John, I'll use it.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.