Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to ckick button when focus is in field with invalid
Message
From
04/10/2002 18:33:40
 
 
To
04/10/2002 15:22:04
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00707894
Message ID:
00707986
Views:
15
>I temporarily caused the invalid processing on the text box to clear the value, but it would be better to allow the user to see the data they had entered. Add a new user, that user, and then have the data to be valid.

OK, so why not capture the data that you cleared and in the modal form (assuming you are using modal) that pops up to enter a new employee number, add the cleared value to it? (I am assuming that the user entered the info correctly and this is a new employee they are referencing, they just didn't know it isn't stored in a table?) If that is the case it would seem a message box should pop up so they can see what is happening, asking them if they would like to enter the new employee. If they click yes then pop up a modal form to complete the entry passing in the info they have already entered to the appropriate text box. Then the user can see what they entered, the modal form can continue to process the addition of a new employee and when the modal form is released re-populate the original text box and set the focus there so the valid event will fire again.

I too think it is a better idea to do the validations at the form level as was already mentioned by the others if a control is allowed to lose focus without correct data.

Anyway perhaps that will give you some ideas...

John
Previous
Reply
Map
View

Click here to load this message in the networking platform