Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mandatory data input
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00223352
Message ID:
00223389
Vues:
17
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform