Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid & Error events
Message
 
To
05/06/1998 17:57:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00105397
Message ID:
00105408
Views:
24
Hi Rafel,

>Now in VFP the lines are executed and return values per line so this is not possible, and besides, if your table's index is set as Primary, you get an error from the first line:

The concept is to trap this error from the form via an error handler. Check out the Form's error() method and AERROR() function to get the error. You may then display the error message to the user. You do not need to do SEEK(this.Value) in the Valid()

>as far as I've seen to keep the cursor in the same field, not even with an error routine that calls the objet's SetFocus event to force this.

You can use _SCREEN.ActiveForm.ActiveControl to get the current object and then set the focus to it. e.g.
IF _screen.ActiveForm.ActiveControl == 'O'
   _screen.ActiveForm.ActiveControl.SetFocus()
ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform