AndrewMozley
Programmer
I have a data entry form with a textbox control, txtThis.
txtThis.value needs to be validated. So, if txtthis.value is not acceptable, the txtthis.valid() method returns .F., and the text box retains control.
However, if the user clicks on a button cmdExit, I would like this to over-ride the effect of txtThis.valid, and (in this case) close the form.
Is there a way of achieving this? That is : Can the valid() method detect that the reason that the textbox needs to be validated is that the user has clicked on cmdExit?
txtThis.value needs to be validated. So, if txtthis.value is not acceptable, the txtthis.valid() method returns .F., and the text box retains control.
However, if the user clicks on a button cmdExit, I would like this to over-ride the effect of txtThis.valid, and (in this case) close the form.
Is there a way of achieving this? That is : Can the valid() method detect that the reason that the textbox needs to be validated is that the user has clicked on cmdExit?