A sample for you to try. "Me.Text0" is the textbox to display the description
and error number.
Private Sub Form_Load()
On Error GoTo ErrorLoad
Err.Raise 5, , "Test Message"
ErrorExit:
Err = 0 'reset error
Exit Sub
ErrorLoad:
Me.Text0 = Err.Number & " - " & Err.Description
Resume ErrorExit
End Sub
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.