Back Up Database feature

L

Lydia

Does the feature Back Up Database exist in Microsoft Office XP Professional?
I am taking an online course in Access 2003 and so far this is the only
problem that I have run into.
 
O

Ofer

As much as I know, there is no build in back up in Access, just copy the
database to a different location as backup.
Using
One option xcopy
x=shell("xcopy c:\FileName.xls c:\backup\")

Second option Use the fileCopy Command

FileCopy "Source + Name" , "Location + name"
FileCopy "c:\FileName.xml","c:\FileName.txt"
 
A

Aaron G

Lydia,

Within Access, click;

Tools/Database Utilities/Back Up Database

HTH

Aaron G
Philadelphia, PA
 
G

Glint

Hi,
I have this problem for some time, and I am tired of having to make a copy
of the backend manually. I tried using filecopy on the close button:

docmd.close
Filecopy "D:\G2 Files\G2BE", "C:\G2 Files"
docmd.quit

When I do this, I get Path/File Access Error.

Meanwhile, I want to place a recent copy of my G2BE database in C:\G2 Files
each time someone closes the database from the front end. I don't know what i
am doing wrong.
 
D

Douglas J. Steele

You're missing the file extension.

Try:

Filecopy "D:\G2 Files\G2BE.MDB", "C:\G2 Files\G2BE.MDB"

Of course, if G2BE.MDB already exists in C:\G2 Files\, you'll get prompted
as to whether you want to overwrite the file.

What you can do is add a date to your file name:

Filecopy "D:\G2 Files\G2BE.MDB", "C:\G2 Files\G2BE" & _
Format(Date(), "yyyymmdd") & ".MDB"

or you can check whether the file already exists:

If Len(Dir("C:\G2 Files\G2BE.MDB")) > 0 Then
Kill "C:\G2 Files\G2BE.MDB"
End If
Filecopy "D:\G2 Files\G2BE.MDB", "C:\G2 Files\G2BE.MDB"
 
G

Glint

Thanx Douglas.
I tried adding the file extension as you suggested and still got:

File Not Found error message.
 
D

Douglas J. Steele

Is your database, in fact, named G2BE.MDB, and is it located in folder D:\G2
Files?

Does folder C:\G2 Files exist?
 
G

Glint

You were perfectly right, Douglas; I omitted a sub-folder along the line.
Your suggestion works like magic!
I am very grateful.
 
Top