Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculated values - Where to put code?
Message
 
À
17/08/1998 10:24:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00127394
Message ID:
00127438
Vues:
25
>>I'm working on a form that has several calculated values. Some are based on other values on the form, some are counts of records in related child tables, and some are sums of records in related child tables. I have no problem with the code required, I'm just wondering where is the best place to put the code because I've thought of so many? I'd really appreciate any input on your approaches and any reasons/benefits to why you did it this way. TIA
>
>The simplest way is to add this code to Form.Refresh method, especially if you have mostly bound controls.

Yes it is the simplest approach, and one of the first I thought of. However, after thinking of this approach, I thought it better to put each individual controls needed calcs in its own .Refresh event because of the number of needed calcs. This way if I want to recalc all of them I use ThisForm.Refresh, if I only need to recalc one I issue calccontrol.Refresh.

Thanks for the input and the quick response.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform