Avatar of cres1121
cres1121
 asked on

In Access I would like before I start a procedure to make a back up of my database

I would like to create a macro to make a copy of my split data database when I click on a button.    I would like to make a back up before we do payroll bi monthly.
Microsoft Access

Avatar of undefined
Last Comment
cres1121

8/22/2022 - Mon
Dale Fye

as long as there are no other users logged into the database, you could use the CompactDatabase method.  The syntax is:

dbengine.CompactDatabase SourceName, DestinationName

but first you need to make sure that no one is logged into the Source database.
Dale Fye

I'm sure you could also use the Filecopy command, again assuming that the backend is not already open.
ASKER CERTIFIED SOLUTION
Jeffrey Coachman

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
cres1121

ASKER
Thanks I will try these.  I did not know anyone had posted.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23