I'm using a Sub Form_Error and Select Case to look for specific errors. I have two comboboxes and when the error is recognized I have an image display. This works fine when cmbEXEID is scanned incorrectly but does not work when the cmbEquipEXEID is scanned incorrectly. Here is the code I have:
Code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 2237
imgTryAgain.Visible = True
Cancel = True
Me.cmbEXEID.Undo
Me.cmbEquipID.Undo
TWait = Time
TWait = DateAdd("s", 5, TWait)
Do Until TNow >= TWait
TNow = Time
Loop
imgTryAgain.Visible = False
Case 3314
Cancel = True
imgTryAgain.Visible = True
On Error Resume Next
End Select
Response = acDataErrContinue
End Sub