Question Create backup file with vba

Milad Roohi

New member
Local time
Today, 20:32
Joined
May 27, 2016
Messages
5
Hi everyone, have nice day
I want to export my tables data in a backup file and use it later.
how can i do this with vba codes??

Please note that i don't want use copyfile method in vba but i want to create simple backup from data in my tables.

Help me pls, thanks
 
Have a look at the DoCmd.TransferSpreadsheet method.

Just create a sub routine to be called before closing the database (on prompt from a command button OR On_Close event of a form OR On_Timer interval event etc). Loop through each table in your DB (excluding the SYS_xxxx tables), create a filename and voila!

Can I ask why you do not want the copyFile method?
 
Have a look at the DoCmd.TransferSpreadsheet method.

Just create a sub routine to be called before closing the database (on prompt from a command button OR On_Close event of a form OR On_Timer interval event etc). Loop through each table in your DB (excluding the SYS_xxxx tables), create a filename and voila!

Can I ask why you do not want the copyFile method?

Thanks...
because that method just create a copy of my file and I can't copy my tables data from it because as i mentioned i can't access to my tables.

can you explain a little more about DoCmd.TransferSpreadsheet ??
 

Users who are viewing this thread

Back
Top Bottom