On 29/04/2013 02:40 PM, Gene Wirchenko wrote:
I am thinking of the case where I have a form open and validation
is occurring and I need to open another form in it. It might be to
set some controls' values, say, some sort of look-up. After that
second form finishes, I would want to be back at the first form in
that same control with the validation still pending. (It is possible
that one of the controls in the first form whose value is changed is
the one that had the validation going.)
As VFP does not allow you to issue a setfocus from a Valid, doing that
will definitely bite you. Maybe you'll need to adjust your way of
thinking.
I can think of two ways to do that:
1. Move your validation code to the LostFocus. If the Validation fails
and you do not want to move onto another control/form, issue NODEFAULT.
or
2. Leave your validation code in the Valid(), but set a flag during the
validation to indicate what should occur in the LostFocus. That is
indicate if to run the other form, or move onto another control.
Frank.
Frank Cazabon
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.