Hi Alan,
I apologize for replying so late... >I'm having a bit of trouble following something here. You call the chkTxtBox() function from the valid of the text box (call it TextA).
I call chkTxtBox() from the lostfocus of the text box If everything is ok, you set the txtOk property to True. If the textbox loses focus to some other control (say TextB) then the button when the button is now clicked from TextB, it registers that the txtOk property is True and thinks it's been clicked directly from TextA.
>
>At what point do you set the property to False?
>
>I don't really think this belongs at the control class level since it's such a one-off type of situation, so it still sounds like I have to put code in the gotfocus event of every control on the form to set the property to .F. unless I'm missing something obvious.
Yes, you need to set txtOk to .F. in the gotfocus of each control that could get focus - in my case, I only had the save, cancel, and 3 other controls enabled.
Doru