Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Table Backup 1

Status
Not open for further replies.

Dmonkyking

Technical User
Apr 1, 2004
27
US
Hi, I'm a novice when it comes to Access and I'm trying to find the easiest way to create a macro, VB code or whatever that would automatically backup a specified table or tables when the database is exited. I know this is probably a very simple process, but I'm not sure where to start. If anyone could help me that would be greatly appreciated.
 
Try searching for CopyObject in the Access Help file
it's something like:

DoCmd.CopyObject, "Employees Copy", acTable, "Employees"

hope that gives you a starting point.
 
Thanks again clapper62. Took me a bit of monkeying around with it, but I got it to work. Thanks for pointing me into the right direction.
 
hi- i have just tried doing this as well in a slightly different form. I have used the docmd.copyobject instruction to copy each table and query to another database stored elsewhere effectively creating a back up everytime the user presses the log off button. this is all fine but now i am getting over write errors telling the object already exists (understandable i guess!) what i want to know is there a way around these? perhaps to get them to over write those tables automatically?

help please! :(
 
bassmekanik,

How about executing:

DoCmd.DeleteObject acTable, "Backup Table"

Just prior to copying?


HTH,
Bob [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top