I have a database in which I have included a button to backup the database using the following code:
Private Sub Comand58_Click()
filename = "c:\Database\Journals.mdb"
Set fso = CreateObject("Scripting.FileSystemObject")
Set mainfile = fso.GetFile(filename)
mainfile.Copy "I:\BACKUP of Journals" & " " & Format(Date, "yyyy-mm-dd") & " [" & Format(Time, "hh.mm.ss") & "]" & ".mdb"
End Sub
The button and backup work fine. However, the target folder must be programmed in for each different user.
Is there a way I can make the button give the user a choice as to the location desired for the backup. The backup file name and time and date format can remain constant.
The built in backup function in 2007 does this. How can I programatically emulate that action?
Thank you for your help.
McLigs
Private Sub Comand58_Click()
filename = "c:\Database\Journals.mdb"
Set fso = CreateObject("Scripting.FileSystemObject")
Set mainfile = fso.GetFile(filename)
mainfile.Copy "I:\BACKUP of Journals" & " " & Format(Date, "yyyy-mm-dd") & " [" & Format(Time, "hh.mm.ss") & "]" & ".mdb"
End Sub
The button and backup work fine. However, the target folder must be programmed in for each different user.
Is there a way I can make the button give the user a choice as to the location desired for the backup. The backup file name and time and date format can remain constant.
The built in backup function in 2007 does this. How can I programatically emulate that action?
Thank you for your help.
McLigs