strProposedSaveName = strBackupPath & strSaveName
Debug.Print “Backup save name: “ & strProposedSaveName
strTitle = “Database backup”
strPrompt = “Save database to “ & strProposedSaveName _
& “?”
strSaveName = Nz(InputBox(prompt:=strPrompt, _
title:=strTitle, Default:=strProposedSaveName))Deal with user canceling out of the InputBox.
If strSaveName = “” Then
GoTo ErrorHandlerExit
End IfSet rst = dbsCalling.OpenRecordset(“zstblBackupInfo”)
With rst
.AddNew
![SaveDate] = Format(Date, “d-mmm-yyyy”)
![SaveNumber] = SaveNo
.Update
.Close
End Withfso.CopyFile Source:=CurrentDb.Name, _
destination:=strSaveNameErrorHandlerExit:
Exit FunctionErrorHandler:
MsgBox “Error No: “ & err.Number & “; Description: “ & _
err.Description
Resume ErrorHandlerExitEnd FunctionBack up Back End Database ....................................................................................
The BackupBackEndfunction is called from the USysRegInfo table to back up the current data-
base’s back end (if there is one) to the path selected in the Extra Options dialog:
Public Function BackupBackEnd()
‘Called from USysRegInfoOn Error GoTo ErrorHandlerDim strBackEndDBNameAndPath As String
Dim strBackEndDBName As String
Dim strBackEndDBPath As String
Dim strFilePath As StringCreating Access Add-ins 14