Back Up Database Menu Item

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am using Access 2003 & under File, there is "Back Up Database..."

Is their a way through VBA code to do this rather than having the select
this ?
So for example it can be done on the click of a button on a form ?

Like,

Private Sub cmdButton1_Click()
'what code goes here to back up Databse
End Sub

Any help would be greatly appreciated.

Thank you,
Jeff
 
The backup database effectively creates a compacted and renamed version
of the current database. I don't believe it is possible, within the
code of an open database, to compact an open database. You could
create a seperate database that could create backups for you though -
would you like the code for that?
 
Thank your for your response. Its ok about the other code. I can do that.
I was wondering becuase that option is already there instead of having to
code something extra.

Thank you,
Jeff
 
Back
Top