Can I automatically backup a database?

I

Iago

I have a database which I would like to have backed up automatically every
time I close it. I would like it to be saved to a particular folder. How can
I accomplish this?
 
W

Wayne-I-M

There are lots ways to do this - and lots of people who will sell a programme
to do it. You can replicate the DB and can run a form with a timer and some
backup vba or do the same on the exit buttons

but the way we do it - very simple I know - but it works fine is to use
windows scheduler

Just set up a daily schedule to something like
copy S:\Accesfiles\merchant.mdb J:\backup

Of course there are also backups done by the windows server each night
anyway (if you set it up and you have a MS server)

As I said lots of way to do it.
 
I

Iago

It is the back end that I want to back up. Just 2 tables that I want to
backup to the local drive since the database is on a network drive.
 
W

Wayne-I-M

It much easiert import table than to export ??
Due to being able to delete the original table then import another with the
same name. Its a little more complex to do this on an outside DB - but the
basics are

DoCmd.TransferDatabase acExport, "Microsoft Access", "Path to DB and
name.mdb", acTable, "table name Old", "table name new", structureonly:=False

Do an f1 search on TransferObject acexport and you will get the full mode

Why not just backup the file folder using scheduler or windows server module
??
 
T

Tony Toews [MVP]

Iago said:
I have a database which I would like to have backed up automatically every
time I close it. I would like it to be saved to a particular folder. How can
I accomplish this?

Close all forms and reports.
Rename the backend.
If it fails then someone else is in the backend so exit now.
Copy it to your local hard drive.
Rename (or compact it back) to the original name.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
Top