A
Annelie
Something is wrong with my code. If there is a problem with the data, I want
to exit the code. If there is no error, I want to proceed and call the
CmdDelete_Click, but it just goes on and deletes the data anyway. I am not
sure where to put the call statement
Private Sub CmdAppend_Click()
On Error GoTo Err_CmdAppend_Click
DoCmd.OpenQuery "3c-QryAppendNewEmpl1"
Me.Requery
Exit_CmdAppend_Click:
Exit Sub
Err_CmdAppend_Click:
MsgBox "There is a problem with duplicate Social Security Number or
Duplicate Name"
Resume Exit_CmdAppend_Click
End Sub
to exit the code. If there is no error, I want to proceed and call the
CmdDelete_Click, but it just goes on and deletes the data anyway. I am not
sure where to put the call statement
Private Sub CmdAppend_Click()
On Error GoTo Err_CmdAppend_Click
DoCmd.OpenQuery "3c-QryAppendNewEmpl1"
Me.Requery
Exit_CmdAppend_Click:
Exit Sub
Err_CmdAppend_Click:
MsgBox "There is a problem with duplicate Social Security Number or
Duplicate Name"
Resume Exit_CmdAppend_Click
End Sub