Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Focus problem
Message
From
16/10/2001 15:30:34
 
 
To
16/10/2001 15:24:37
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00569234
Message ID:
00569240
Views:
20
Is there a reason you aren't using the Valid method to do the validation. Returning a 0 or .F. there will keep focus on the control.

>Hi. VFP6 user here. I am having trouble placing the user back in the current field when my data validation fails. Fox doesn't like SetFocus in the valid, and it doesn't seem to work for me in the LostFocus.
>
>For Example (in LostFocus)
>IF ! "Dr" $ This.Value
> =messagebox('This list should be Doctors only.',16,'Go Back')
> This.SetFocus
>ENDIF
>
>...doesn't work
>
>Thanks, Randy
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform