Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mandatory data input
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00223352
Message ID:
00223389
Views:
16
>Hi George:
>
>Thanks for responding.
>
>When I put this code in the valid event, I get the error:
>"cannot call setfocus from with a When, Valid, Rangehigh or rangelow
>event".
Hi Sheena,

You simply need to return .F. from the .Valid to return the focus to the control that called it. You might use something like:
LOCAL llresult
llresult = NOT EMPTY(This.Value)
IF NOT llresult
  = MESSAGEBOX("You must enter a Startdate for your Intervention!", 48, "CATS")
ENDIF
RETURN llresult
In the above, if nothing is entered in the text box, the user will get the messagebox. Otherwise, focus moves to the next control in the tab order.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform