Copy Database

  • Thread starter Thread starter Akilah
  • Start date Start date
A

Akilah

How do you copy a database to another location using VBA? I want to copy a
database from one location and save it in another location under a different
name. Also, will it overwrite a database if there is one present with the
same name? Will it overwrite the database if it is locked? Thanks.
 
Assuming you're not trying to copy the current database, you can use the VBA
FileCopy command. It will not overwrite the file if it already exists, but
not if it's currently in use. (an error will be raised)
 
Thanks, I'll try that.

Douglas J. Steele said:
Assuming you're not trying to copy the current database, you can use the VBA
FileCopy command. It will not overwrite the file if it already exists, but
not if it's currently in use. (an error will be raised)
 
Back
Top