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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy database

Status
Not open for further replies.

ryan1

Programmer
May 15, 2002
106
0
0
US
How do i transfer the whole database from one location to another using VBA. The copyed version would be a back Up.
 
You could do it like this...

Dim fso as New Scripting.FileSystemObject
fso.CopyFile <yourSourceFile>, <yourTargetFile>, True

Notes:
1. Set 3rd parameter True to overwrite an existing file
2. You may need to set a reference in your project to the scripting runtime contained in sccrun.dll
 
Good call, works like a champ.Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top