Copy Database

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.
 
D

Douglas J. Steele

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)
 
A

Akilah

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top