Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using A Buffer File
Message
From
08/12/2001 01:53:48
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00590334
Message ID:
00591625
Views:
30
Nadya
I tried again to get the approach that Claudio described to work, and it finally has! Here's what I did, (BTW I'm using VFP 6.x ) I created a property in the form, in the Init event I used the following syntax:

select XXXX ( table )
scatter name thisform.propertyname memo ( if necessary )

I was then able to access the various elements using the syntax
thisform.propertyname.fieldname
the key for me was to make sure I preceeded every reference with thisform.propertyname.xxxx

The bonus for me was that I took the same code for the declaration out of the load event, so I only have it in the init event, and when I launched a child form, I was still able to access the contents of the array by preceeding the property name with the name of the called from form:
oldformname.propertyname.fieldname
I was very pleased that it all worked and many thanks to Claudio and all who contributed. I'm not sure if I'm doing it in the most efficient way , but so far the results are good.

>>Claudio,
>>
>>I just tried what you are doing and something has definitely changed in VFP 7. Using scatter in the load in VFP 6 gives and error of variuablke does not exist, but in VFP 7 it does not cause that error.
>
>Hi Jim,
>
>Is there a way to check scope of these variables? Say, switch to command window and try ?type('m.MyField') If it would be other than 'U', then it means, what scatter memvar memo now creates global vars. You also can check, if they will be visible after form is closed.
>
>I don't have VFP7 to test this assumption.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform