| | |
|
|
|
Code to automatically export all tables to a backup with date as name |
| message from Henro on 16 May 2004 |
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
|
| Rick Brandt replied to Henro on 16 May 2004 |
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.
|
| Henro replied to Rick Brandt on 16 May 2004 |
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?
Thanks!
Henro.
"Rick Brandt" <rickbrandt2@hotmail.com> schreef in bericht
news:2gpbfeF56do5U1@uni-berlin.de...
|
| Rick Brandt replied to Henro on 16 May 2004 |
DBEngine.CompactDatabase "Path to BE.mdb", "BE" & Format(Date, "yyyymmdd") &
".mdb"
|
| Henro replied to Rick Brandt on 16 May 2004 |
And what if the backend is password protected?
I tried the code but is says: "not a valid password"
Suggestions?
"Henro" <maxlesallaud@hotmail.com> schreef in bericht
news:Ot2v5t1OEHA.556@tk2msftngp13.phx.gbl...
|
| Rick Brandt replied to Henro on 16 May 2004 |
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.
|
| Henro replied to Rick Brandt on 16 May 2004 |
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
"Rick Brandt" <rickbrandt2@hotmail.com> schreef in bericht
news:2gptipF5du55U1@uni-berlin.de...
|
|
Archived message: Code to automatically export all tables to a backup with date as name (Microsoft Access Error Message)