Link to home
Start Free TrialLog in
Avatar of Michael Paravicini
Michael ParaviciniFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Try using the control's Exit event.
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.
and the user uses TAB to enter the data
Exit event! Try and comment back.
Avatar of Michael Paravicini

ASKER

Thank you so much for your help!
Regards Michael