Hi all I am new to access VB
I the code below to close 'frm_two'
but all I get is a run time error
Private Sub Command0_Click()
On Error GoTo HandleError
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close acForm, Form_frm_two, acSavePrompt
HandleExit:
Exit Sub
HandleError:
MsgBox Err.Description
Resume HandleExit
End Sub
Private Sub Form_Unload(Cancel As Integer)
If AllowClose = False Then
Cancel = True
MsgBox "Use the Form -> Close option to close this form"
Me.Visible = True
End If
End Sub
I the code below to close 'frm_two'
but all I get is a run time error
Private Sub Command0_Click()
On Error GoTo HandleError
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close acForm, Form_frm_two, acSavePrompt
HandleExit:
Exit Sub
HandleError:
MsgBox Err.Description
Resume HandleExit
End Sub
Private Sub Form_Unload(Cancel As Integer)
If AllowClose = False Then
Cancel = True
MsgBox "Use the Form -> Close option to close this form"
Me.Visible = True
End If
End Sub