Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scatter name and scope
Message
De
20/03/2009 10:54:17
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01389789
Message ID:
01390003
Vues:
156
Thanks Jim,

I had all that setup but I had a parity error and used this.otable instead of thisform.otable in the controlsource.

>>Hi All
>>
>>I have a form that I wanted to use an object in the controlsource for some of the controls. First I tried scatter name to a form methond called this.otable but this.otable.fieldname did not work as a control source. I thought that I would just use an object variable instead but private variables go out of scope after they are setup. I know I could use public variables but I would rather not. I could use a cursor but the object seemed cleaner to use. Any ideas?
>>
>>Thanks.
>
>Your first idea is the best but you have to deal with the fact that at the time the form is run when it is first being populated with controls your property does NOT have an object in it yet unless you set it up in the form's Load event like this;
>
>
>* Form's load event
>NODEFAULT
>IF NOT USED("TableAlias")
>   USE TheTable IN 0 AGAIN ALIAS TableAlias
>ENDIF
>SELECT TableAlais
>GO BOTTOM
>SKIP && Move to phantom record at EOF
>SCATTER MEMO NAME This.oTable
>DoDefault()
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform