Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save or saveas a back-up copy of working database 1

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
I am working with Access 2000 and Windows XP. I have a database which I open and enter data using a form and some VBA code. When I am done entering my daily data I would like the VBA code to save a back-up copy of the Access database file I just updated to the C:\Temp directory. Is this possible ? Thank you.
 
It's possible, you just have to open another thread to do it. Here's one way:

Dim strDOScmd As String
strDOScmd = "COPY " & Chr(34) & CurrentDb.Name & Chr(34) & " " & Chr(34) & "C:\DESTINATION_PATH\Test.mdb" & Chr(34)
Shell "C:\Windows\System32\Cmd.exe /C " & strDOScmd, vbHide ' Use vbNormalFocus to debug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top