Question difference between backup and copy/paste

joeblow2

Registered User.
Local time
Yesterday, 16:27
Joined
Jun 28, 2008
Messages
39
Hi:

Could someone tell me please what is the difference between backing up the database via the menus (Tools|Database Utilities|Back Up Database)
and simply copying and pasting the database file?

Thanks in advance.
 
Only difference that I can make out that is copy the database to the selected location, and compacts and repairs it aswell.
 
Thank you for your help.
 
The one from Date Base Utilities adds a date stamp. If you back up again on the same day it will add a 1 and a 2 and so on.

Say the .mdb file is called Diet then first back up today would be in the same folder as the file would be

Diet_2008-11-27

Back up again today and a second one would be made

Diet_2008-11-27_(1)

If you are happy to back up when the data base has been closed then you can make your own which will add both date and time to the file and you decide which folder and which external drives it goes to. Actually, the Tools/Data Base Utilities closes the DB and reopens it to the data base window.

You can copy you DB and date/time stamp it and use either code or a batch file. Batch files are very good if you want to copy it to all available computers on a network.

Here is something you can start with to get you going.

FileCopy "c:\ViperResides\Viper.mdb", ("c:\Letters\ Viper " & Format(Now, "YYYY-MM-DD") + " " & Format(Now, "hh-mm-ss") + ".mdb")

That copies the data base called Viper from the folder ViperResides to the folder Letters and as

Viper 2008-11-27 18-20-28

If you search on Google for stuff like

time date stamp batch

time data stamp VBA Access

you will get heaps of stuff.
 
What you can do is make a little DB and save it to the Desktop folder.

In the DB make a module and paste this in

Public Function BU()

FileCopy "c:\ViperResides\Viper.mdb", ("c:\Letters\ Viper " & Format(Now, "YYYY-MM-DD") + " " & Format(Now, "hh-mm-ss") + ".mdb")

End Function

But of course change the file name and folder to suit you.

Then make a macro and the first action line is RunCode. At the bottom of the macro design screen put BU()

Then make another action line for Quite.

Then save the macro and name it Autoexec.

When you click on the Desktop icon the DB will open, do the copy and then shut down. If you put the icon on the taskbar one click will do it.

Have fun:)
 

Users who are viewing this thread

Back
Top Bottom