>The problem is most likely due to the way way VFP handles toolbars. Toolbars don't get focus. As such, when you click on something in a toolbar that does something, the valid code of the control you were just in doesn't get called. If the toolbar brings up another form, when that form becomes active, the Valid executes for the "current" control.
>
Thanks for the info.... that is pretty much what is going on.
I had to resort to bypassing the code that was already in the LOSTFOCUS event for the field in question. I had to put IF NOT WVISIBLE('this is the new form that just popped up')
before calling the LOSTFOCUS event... thereby not executing the code there.
Thanks.
>IN the framework we use (VMP), there is code in the all toolbar controls to execute the validation code associated with the "current" control (_Screen.ActiveForm.ActiveControl). You can get a return code from that and if it passes, execute the code associated with the toolbar control. Otherwise, don't do anything and the focus won;t leave the control.
>
>HTH.
Tommy Tillman A+ NetWork+ MCP