Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function keys and validations
Message
De
05/06/2002 16:21:45
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00665069
Message ID:
00665129
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
Hi Nadya:

I had a similar problem designing a Nav bar because I wanted to detect user changes the moment they made them and immediately enable/disable the appropriate button(s).

I discovered the Value property didn't change until Focus left the field. I had a solution along the lines of yours, and to detect the underlying value of the Table I used:
oCurrentControl = THIS.oCurrentForm.ActiveControl
IF oCurrentControl.Value <> Eval(oCurrentControl.ControlSource)
     Messagebox("Change made.")
ENDIF
As you can see I had to query the underlying ControlSource to detect changes.

HTH,

-Irv.


>Hi everybody,
>
>Here is a problem: for convenience in Data Entry I have certain F keys to perform actions. For instance, F9 key saves the data. First it checks validity of the data and if everything is fine, saves it. Otherwise it brings focus to the offending field. So, I type something in the textbox, then press F9 and it gives me the same error again, because field source hasn't yet updated with the value. What can I do? In FormValid always check against form controls and not the actual fields? Is there more convenient method?
>
>Ok, I have an idea: at the top of FormValid method check for ActiveControl, if it has value property set value=value.
>
>Do you think, this would work?
>
>Yep, it does work:
>
>if type('thisform.ActiveControl.value')<>'U' && Active control exists and has a value property
>		   thisform.ActiveControl.value = thisform.ActiveControl.value
>	endif
>
>Thanks in advance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform