Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function keys and validations
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Function keys and validations
Divers
Thread ID:
00665069
Message ID:
00665069
Vues:
58
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.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform