>I am looking for a way to keep the Valid event on a TextBox from firing if I click on a navigation button (cmdCancel). There is code behind the Valid Event of the Textbox that requires data entry. However, if the user clicks cmdCancel I want the form to stop everything do all TableReverts without caring about whether or not there is text in the current TextBox that has the focus. I could not find anything written that describes how to keep some event from firing.
>
Eric,
Set the cancel property of cmdCancel to .t. (you probably have already done this). In the valid method of the text box, you can check for the escape key:
if lastkey() <> 27
else
endif
HTH,
Steve Gibson