Hi guys, I am wondering it this is possible.
Basically, what I do currently is use the Form_Error() event to trap
erros and display customer error messages.
Problem is, I need to do this in every form. Of course, i know this is
essential. But wouldn't there be a way to use a module to call during the Form_Error Event?
Example: Instead of doing:
I would then create a module with this sub:
Then on the form's error event, do this.
This works when I tried it, the problem is only the Else part works if I put it on the module. It doesn't seem to recognize the DataErr: 3022
Not to mention, when i use the Err.Number always just gives me 0
Thanks in advanced.
Basically, what I do currently is use the Form_Error() event to trap
erros and display customer error messages.
Problem is, I need to do this in every form. Of course, i know this is
essential. But wouldn't there be a way to use a module to call during the Form_Error Event?
Example: Instead of doing:
Code:
Public Sub Form_Error(DataErr as Integer, Response as Integer)
If DataErr = 3022
'some message
Else
'some message
End If
End Sub
Code:
Sub ErrorHandler()
If DataErr = 3022
'some message
Else
'some message
End If
End Sub
Code:
Private Sub Form_Error(DataErr as Integer, Response as Integer) Call ErrorHandler Response = DataErrContinue End Sub
Not to mention, when i use the Err.Number always just gives me 0
Thanks in advanced.
Comment