OnError for Textbox

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Am I overlooking something?

I can't find an OnError event for textboxes. Currently,
I only find them on the FORM properties.

If I'm correct, how do I execute the OnError event (FORM)
via OnClick event (TEXTBOX)?

Thanks,
Tom
 
Use this line of code to call that event's code:

Call Form_Error(DataErr As Integer, Response As Integer)
 
Ken:

Actually, I meant to say COMMAND BUTTON instead of
TEXTBOX.

Anyhow, once I put the line of code in there, it appears
in "red". When executing, the VBA window pops up for
debugging.

Any additional pointers?

Tom
 
Do you have code for the OnError event in the form's module? If not, then
you'll need to put code there that you want to have run.

If you're asking "how do I raise the 'OnError' event of the form" in code,
then I don't believe that you can do that. But whatever you want that
event's code to be, write it and then call it as I noted.
 
Back
Top