>Hello Larry,
>
>Some progress! It looks as though loparam object is being created OK. The problem is that it seems unavailable to the form when passed using
>
>do form editvar.scx with loparam
>
>What exactly do I need to put in the init event of the form to enable it to access loparam?
>
>Thanks for your patience...
>
John,
In the form's Init:
lparameter toparam
local llretval
llretval = .T.
if vartype(toparam) = 'O' then
THISFORM.oParam = toParam
else
llretval = .F.
endif
With THISFORM
if llretval then
.text1.Value = .oParam.uVarOldValue
.Caption = .oParam.cCaption
endif
Endwith
return llretval
If the parameter object isn't passed then the Init will return .F.. The form will not instantiate.
Then in the Click method, you can access the form's oParam property. You can set the form up to have an oParam property from the Form Designer or you can add an AddProperty call in the Init method (it's up to you).
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao