Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid event for grid objects.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00083519
Message ID:
00083605
Views:
21
>Textbox validation code within a grid doesn't work when you click on an object outside the grid.
>
>In my textbox.Valid event with the grid I validate the contents of the textbox. If the value is invalid I display a message and return 0 else I return 1.
>
>If I enter an invalid value in the textbox then click on a different column in the grid my error message is displayed and the focus does not change. If I enter the same value then click on a field outside the grid, I get my error message but the focus changes to the field that I clicked on. The return 0 doesn't stop the focus from changing.
>
>Any ideas?

Try moving your code from .Valid to .LostFocus and return .F. if an error. I haven't tested this myself so let me know. HTH
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform