Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Confused Forms
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00617417
Message ID:
00618272
Views:
19
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.

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.

>Hi again!
>
>We have a problem here that has shown up in many of our apps and I'd like some input before I take a shot at fixing it....
>
>We have a form called Contact that has many fields on it.
>
>Some have validation that moves the focus to other parts of the form (to other pages on the Pageframe) if the value is valid.
>
>I want to concentrate on the last field of the 2nd page of the pageframe. The field is called literature id.
>
>It has validation code that moves to another field on another page of the pageframe if it is valid.
>
>We also have a Form called Locate, used for locating distributors if the contact needs to know that info.
>
>When the focus in on the literature field, and the operator selects the Locate button on the Toolbar, to bring up the Locate Form, the Locate Form comes up, then the Contact Form seems to activate in the background, and the validation code for the literature field appears to run, and at that point, the system is hung.... the Locate Form is on top, but the Contact Form appears to be the one in control, but it is in the background, and unable to bring to the front.
>
>Any of you have had a similar situation? I figure I am going to have to put some code in the literature id field's valid to handle this problem....
>
>Any ideas??
>
>Thanks!!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform