We help IT Professionals succeed at work.

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

Michael Paravicini
on
112 Views
Last Modified: 2018-08-27
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
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Anders Ebro (Microsoft MVP)Microsoft Developer
CERTIFIED EXPERT

Commented:
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 NasrRetired IT Professional
CERTIFIED EXPERT

Commented:
Try using the control's Exit event.
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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.
Hamed NasrRetired IT Professional
CERTIFIED EXPERT

Commented:
and the user uses TAB to enter the data
Exit event! Try and comment back.

Author

Commented:
Thank you so much for your help!
Regards Michael
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.