Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
For the experts: control value vs field value.
Message
De
05/06/1998 14:00:26
 
 
À
05/06/1998 13:45:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00105233
Message ID:
00105266
Vues:
31

>Which one is the better way to go in operating in code in a form?:
>with the 'thisform.textbox1.value' or with the 'alias.myfield'?
>asuming the textbox1 is bounded to the alias.myfield.>

One word of caution, using 'thisform.textbox1.value' can work for or against your favor.

For example, if you reposition the record pointer in your table and don't refresh 'thisform.textbox1' before referencing it's value, the 'alias.field' value will vary from 'thisform.textbox1.value'.

This can very easily happen on a pageframe where the textbox value being referenced is on a page other than the active page. If you don't explicitly refresh the "non-active" page, the textbox value will still contain the old one.

However, if for some reason you want to have the previous value handy immediately after changing the record pointer, this is a "clever" (albeit dangerous) way to access it.<s> HTH.
Later...
/< /-/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform