Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scatter name and scope
Message
From
20/03/2009 10:54:17
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01389789
Message ID:
01390003
Views:
155
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()
>
Previous
Reply
Map
View

Click here to load this message in the networking platform