Automatic backup of database vba

aman

Registered User.
Local time
Today, 04:45
Joined
Oct 16, 2008
Messages
1,251
Hi Guys

I have developed a project in Access so its split into frontend and backend. The Access frontend is named as "Recorded System" and the Access backend is named as "Recorded Database". As I will be away from office for 4 weeks (going on holiday) and I am the only software developer in my company so my manager wants me to do the following things before I go in case some issues arise in my absence like database crashes or some other problem. I need to write VBA code to perform following steps.

1. When the user opens the frontend then check if todays date is there in table (NewTBL)(NewTBL is a separate database that stores Username,Date,time when the frontend is opened to make sure we are keeping daily backup). If todays date is not there then create a backup of the Access database(Recorded Database) in a folder and store todays date in the NewTBL. But if todays date is already there in NewTBL then don't create a backup of Access database(Recorded database). (This way everyday when the first user will open the frontend then the backup will be created so that in case a crash occurs then they can recover it using that Backup copy)

2. Sometimes the Access database(Recorded database) is corrupt then in that case when the user opens the frontend then it should check if the Access database is corrupt or not. If its not corrupt then perform step 1 but if its corrupt then a message should appear "The database is corrupt , please contact Your Manager) and also in that case don't make a copy of Access database in the folder and also in NewTBL , todays date should not be inserted.

3. If the database is not corrupt then we need to make a backup of the Access database in a folder. Basically replace the old backup everytime as we can't keep new copy daily because of storage restrictions.

I can do everything apart from checking if database is corrupt or not. Hope anyone can help me in this.

Thanks
 

Users who are viewing this thread

Back
Top Bottom