D
Don
When I try to program a message box with multiple buttons, i.e. YES, No or
Retry, Cancel, I can program one button to do what I want, but I can't get
the second button to do anything. I'm going to include the code that I've
tried with a message box I've created; can someone tell me what I've done
wrong?
Private Sub txtPASSWORD4_BeforeUpdate(Cancel As Integer)
If Me.txtPASSWORD4 <> DLookup("[PASSWORD]", "tblPASSWORD") Then
If MsgBox("Incorrect Password, try again!", 5 + 48 + 0, "Password
Confirm") = 4 Then
Cancel = True
Me.txtPASSWORD4.Undo
Else
If MsgBox("Incorrect Password, try again!", 5 + 48 + 0,
"Password Confirm") = 2 Then
Me.Undo
DoCmd.Close , "frmDSR", acSaveNo
End If
End If
End If
End Sub
I'd appreciate any help that I can get.
Retry, Cancel, I can program one button to do what I want, but I can't get
the second button to do anything. I'm going to include the code that I've
tried with a message box I've created; can someone tell me what I've done
wrong?
Private Sub txtPASSWORD4_BeforeUpdate(Cancel As Integer)
If Me.txtPASSWORD4 <> DLookup("[PASSWORD]", "tblPASSWORD") Then
If MsgBox("Incorrect Password, try again!", 5 + 48 + 0, "Password
Confirm") = 4 Then
Cancel = True
Me.txtPASSWORD4.Undo
Else
If MsgBox("Incorrect Password, try again!", 5 + 48 + 0,
"Password Confirm") = 2 Then
Me.Undo
DoCmd.Close , "frmDSR", acSaveNo
End If
End If
End If
End Sub
I'd appreciate any help that I can get.