Avatar of Michael Paravicini
Michael Paravicini
Flag for Chile asked on

Validation Rule does not kick in if user uses tab and no data is entered!

I use personalized validation rules on my forms. However, if a field needs to have data (ie may not be empty nor null) and there is no default value and the user uses TAB to enter the data then the validation rule does not kick in and the form will save an empty field. Is there a way to force a 100% the validation rule even if the user has not entered any data (and just uses the tab key)??

Thank you for any help!
Regards Michael
Microsoft Access

Avatar of undefined
Last Comment
Michael Paravicini

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Gustav Brock

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
PatHartman

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Anders Ebro (Microsoft MVP)

Furthermore, if you require a field to be non-empty, then at the table level you should specify that the field is Required. That guarantees that the user cannot leave the value blank. It does not provide the most user-friendly message, which is where a before_update check can be useful.
Hamed Nasr

Try using the control's Exit event.
PatHartman

And what if the control never gets the focus?  That was a rhetorical question so I'll answer for you.  No control event will ever fire if the control never gets the focus.  That is why it is important to understand form and control events and how to use them.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Hamed Nasr

and the user uses TAB to enter the data
Exit event! Try and comment back.
Michael Paravicini

ASKER
Thank you so much for your help!
Regards Michael