Create New Database

G

Guest

I have a data file lets call it data.mdb, and I have a front end data base
called forms

What I want to be able to do is automatically create a copy of the data.mdb
file called data2.mdb when I click a button on the forms database.

Is there anyway this can be coded
 
G

Guest

Nigel,

Try this

Private Sub cmdBackup_Click()
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CopyFile "c:\tempfolder\data.mdb", "c:\tempfolder\data2.mdb"
Set fs = Nothing
End Sub

Ken
 

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

Similar Threads


Top