OnError for Textbox

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
 
K

Ken Snell

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

Call Form_Error(DataErr As Integer, Response As Integer)
 
T

Tom

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
 
K

Ken Snell

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.
 

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.

Ask a Question

Top