>>Cetin
>>You're right about adding the properties to the form, instead of using public. OTOH, sometimes i'm lazy, and i define all the memvars as public in the init, and release them in the unload method. This way, i can load the data with scatter and save with gather, instead of writing all the Replace commands.
>>
>
>OK Jaime,
>I'm not in the group that's against public vars :) However as I said in my last reply to myself if a controlsource is set to memvar it's implicitly made public by VFP itself :)
>Pageframes have some problem (more truely a feature for performance) with this and refreshing the pages in a loop workaround it too.
>Cetin
And again BTW :)
Insetead od scatter-gather to memvar you could
scatter name thisform.oRecord
*bind controlsources to thisform.oRecord.Fieldname
..
gather name thisform.oRecord
too. Also for multiple scatters it could be an array property :
dimension thisform.oRecs[reccount()]
for ix=1 to reccount()
scatter name thisform.oRecs[ix]
skip
endfor
You could mimic kind of browse :)
for ix = 1 to 5
with eval('thisform.mytxt'+ltrim(str(ix)))
.Controlsource = 'thisform.oRecs['+ltrim(str(ix))+'.LastName'
endwith
endfor
Or just set your navigation buttons to change ix :)
Cetin