Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid and Lostfocus in Grid
Message
 
To
24/09/1998 11:20:46
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00140289
Message ID:
00140401
Views:
29
>Thank´s George !!
>
>I know valid occurs before the lostfocus, the problem is the lostfocus those not occurs when you click on a control outside of the grid.

Sorry, Joao, I didn't get the part about clicking on a control outside of the grid. As Cetin mentioned this is a known problem. There are a couple of ways to handle this. I prefer, what I believe to be the simplest, and most direct. Given the code you've shown, why bother to reset the value in .LostFocus if Valid is being executed. Simply
IF This.Value > 1000
  = MESSAGEBOX('Maximum value is 1000', 64, ThisForm.Caption)
  This.Value = 0
  RETURN .F.
ENDIF
This will mean less code (and maintenance) for you.
George

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

Click here to load this message in the networking platform