I have a unbound field on a form that I use to lookup a record in the database or to enter a new record. I do not want the user to be able to leave it blank. I can easily add a check in the "on exit" of that field. The problem is that if they press the close button, I would like to skip the validation and just exit the program.
Is there anyway to determine the "next control"? This would be the control that caused the program to exit the unbound field described above. If I knew the next control, I could skip the validation if the next control = "btnClose".
This is basically the opposite of screen.previouscontrol. I need something like screen.nextcontrol.
Currently, the only way a user can exit the form when the lookup field is blank is to press the red x in the upper right hand corner. I would prefer to let them close via my close button.
In the on exit routine I would add the following logic to accomplish what i am after:
if NextControl = "btnClose" then
Any help would be greatly appreciated.