Hello I am currently doing a i.t course and i am currently doing my massive project
i am creating a dasebase for a hair salon
what i want is to when it closes to create a back up but all i am getting is copydatabasefile is'nt avilble now ??
here is my code simple
Option Compare Database
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim intResponse As Integer
Dim strFileName As String
intResponse = MsgBox("Are you sure you want to Quit?", vbYesNo, "Warning!!")
If intResponse = 6 Then
DoCmd.CopyDatabaseFile DatabaseFileName:="P:\Backup\Zion Appointment System Backup " & Now & ".mdb", OverwriteExistingFile:=False, DisconnectAllUsers:=True
End
Else
DoCmd.Close
End If
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
I hope you can help out
Many Thanks
Robert
i am creating a dasebase for a hair salon
what i want is to when it closes to create a back up but all i am getting is copydatabasefile is'nt avilble now ??
here is my code simple
Option Compare Database
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim intResponse As Integer
Dim strFileName As String
intResponse = MsgBox("Are you sure you want to Quit?", vbYesNo, "Warning!!")
If intResponse = 6 Then
DoCmd.CopyDatabaseFile DatabaseFileName:="P:\Backup\Zion Appointment System Backup " & Now & ".mdb", OverwriteExistingFile:=False, DisconnectAllUsers:=True
End
Else
DoCmd.Close
End If
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
I hope you can help out
Many Thanks
Robert