I am trying to trap errors when users enter data from a form
I have a field - project number - where if they enter a non valid number they get a MS Access error message - MS Jet enging cannot find matching error etc.
they only get this error when they tab out of this field. When they click out of the field this does not occur.
Quesiton 1 - Why does this error not appear when they click out?
Question 2: I have used:
private Sub Combo116_Exit(Cancel As Integer)
On Error GoTo errorhandler
exithere:
Exit Sub
errorhandler:
Select Case Err.Number
Case 3101
MsgBox "Please enter a valid Project Number"
Resume exithere
Case Else
Resume exithere
End Select
End Sub
To try and trap the error but I still get the standard MS error message - Can anyone tell me where I am going wrong please????
Thanx.
I have a field - project number - where if they enter a non valid number they get a MS Access error message - MS Jet enging cannot find matching error etc.
they only get this error when they tab out of this field. When they click out of the field this does not occur.
Quesiton 1 - Why does this error not appear when they click out?
Question 2: I have used:
private Sub Combo116_Exit(Cancel As Integer)
On Error GoTo errorhandler
exithere:
Exit Sub
errorhandler:
Select Case Err.Number
Case 3101
MsgBox "Please enter a valid Project Number"
Resume exithere
Case Else
Resume exithere
End Select
End Sub
To try and trap the error but I still get the standard MS error message - Can anyone tell me where I am going wrong please????
Thanx.