Code to automatically export all tables to a backup with date as name

  • Thread starter Thread starter Henro
  • Start date Start date
H

Henro

I made this database for which I need an alternate backup strategy:
What I am actually looking for is code in a frontend that, on opening, will
export all the tables (in the backend) to a new database that has a unique
name.
(preferrably it should have the date in it)
Is there anyone that has such a code?

Thnx in advance!

Henro
 
Henro said:
I made this database for which I need an alternate backup strategy:
What I am actually looking for is code in a frontend that, on opening, will
export all the tables (in the backend) to a new database that has a unique
name.
(preferrably it should have the date in it)
Is there anyone that has such a code?

Actually if you have a split application you can either use FileCopy or code to
compact the back end to a new file name that you specify. This would be a lot
easier than exporting the tables individually.
 
That's a good idea, especially the second one sounds like just what I need!
Can you give me any hints as how this code should look?

I am very far of being a code wizard, that's why............

Thanks!

Henro.
 
Henro said:
That's a good idea, especially the second one sounds like just what I need!
Can you give me any hints as how this code should look?

I am very far of being a code wizard, that's why............


DBEngine.CompactDatabase "Path to BE.mdb", "BE" & Format(Date, "yyyymmdd") &
".mdb"
 
And what if the backend is password protected?
I tried the code but is says: "not a valid password"

Suggestions?
 
Henro said:
And what if the backend is password protected?
I tried the code but is says: "not a valid password"

Suggestions?

How are you able to link to it then? Sorry I'm not that familiar with the
password feature. Everything I've read says that it is so easy to circumvent
that you might as well get rid of it.
 
I used the filecopy method using something I found at Microsoft.
(http://support.microsoft.com/default.aspx?scid=kb;en-us;207703&Product=acc2
000) combined with your method to give the database a new name every day.
The password has to be entered only once, when linking the FE to the BE. As
long as you do not need to relink the connection/password is transparant.

It is not for security that I use it, I just don't want my collegues
rummaging around in the tables. This way they know they have to stay out :p

Grtz Henro
 
Back
Top