Saving a Copy of Database in VBA

M

Mike

I am trying to write VBA code that will take an existing
Access database template and save a copy under a new file
name. Is this possible to do in VBA? I cannot seem to
get very far with VBA/Access Help.

Thanks,
Mike
 
D

Dirk Goldgar

Mike said:
I am trying to write VBA code that will take an existing
Access database template and save a copy under a new file
name. Is this possible to do in VBA? I cannot seem to
get very far with VBA/Access Help.

Where is the code running? If it's not actually running in the database
to be copied, and all you want to do is copy an existing file -- which
is not open at the moment -- to a new name, you can use the VBA FileCopy
statement; e.g.,

FileCopy "C:\Templates\Template.mdb", "C:\Temp\NewDB.mdb"
 
G

Guest

-----Original Message-----


Where is the code running? If it's not actually running in the database
to be copied, and all you want to do is copy an existing file -- which
is not open at the moment -- to a new name, you can use the VBA FileCopy
statement; e.g.,
FileCopy "C:\Templates\Template.mdb", "C:\Temp\NewDB.mdb"
 

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