Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnDirty goto, but only after validated? 3

Status
Not open for further replies.

Lunatic

Technical User
May 8, 2006
405
US
Goal: In a series of fields on a form, user enters # in fields. If #:
a) meets validation rule, focus is set to the next field.
b) does not meet validation rule, error box appears informing of why (# =/= 1, 2, 3, or 9) and field is reset to null.

What I've tried is to set the validation rules in the properties box for the field. That worked. Created a macro to advance to the next field OnDirty (a goto macro). They work together fine with valid entries, they don't work together fine with invalid entries.

What happens is an error message is returned telling me the macro can't run and asking me to halt the process.

Should I be placing the macro with a different event trigger? I like the on dirty goto because as they are only entering a single digit.

Thoughts or suggestions on what I should be doing are much appriciated!

***************************************
Have a problem with my spelling or grammar? Please refer all complaints to my English teacher:
Ralphy "Me fail English? That's unpossible." Wiggum
 
Have you set the AutoTab property ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Paul, PHV

Thank you for your help. The AutoTabs did the trick. Your help has been greatly appriciated.

Thank you again.

***************************************
Have a problem with my spelling or grammar? Please refer all complaints to my English teacher:
Ralphy "Me fail English? That's unpossible." Wiggum
 
I've passed over that Auto Tab property a thousand times and never even looked at so PHV gets a star from me as well.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top