Use VBA code to automate database backups

  • Thread starter Thread starter Michael_Randall
  • Start date Start date
M

Michael_Randall

Hi,

I read a post from 2006 that talked about using VBA and Windows task
scheduler to automate database backups. I'm using Office 2007 and am
wondering if there are any examples that I can look at to learn how to
automate database backups.

Thanks
 
On Tue, 11 Aug 2009 19:50:01 -0700, Michael_Randall

This is a forum about the Microsoft Access database product. Please
ask your question in the most appropriate newsgroup.

That said, you can certainly schedule a task to run ntbackup.exe.
Search the Windows help file for scheduling tasks, and read up on how
to use ntbackup (Accessories > System Tools).

-Tom.
Microsoft Access MVP
 
Tom,

Thanks for the suggestion and sorry about not specifying that my question
was about Access. I am working with Access and I found (in the help) articles
about archiving and backing up the Access database. However, I couldn't find
any thing on automated backups for Access.

Thanks
 
Michael_Randall said:
I read a post from 2006 that talked about using VBA and Windows task
scheduler to automate database backups. I'm using Office 2007 and am
wondering if there are any examples that I can look at to learn how to
automate database backups.

When the user exits the FE attempt to rename the backend MDB
preferably with todays date in the name in yyyy-mm-dd format. Ensure
you close all bound forms, including hidden forms, and reports before
doing this. If you get an error message, oops, its busy so don't
bother. If it is successful then compact it back.

See my Backup, do you trust the users or sysadmins? tips page for more
info.
http://www.granite.ab.ca/access/backup.htm

Tony
 
Back
Top