>>>Can anyone tell me how to pass parameters by reference when using the CREATEOBJECT()command? I'm using VFP 3.0. Any help would be greatly appreciated.
>>
>>check the help for syntax, but something like
>>
>>oThisObj = createobject('mainform',@lcCurrentRec)
>>
>>remember the object's init must have the parameters/lparameters statement first.
>
>I had tried using the @, but because what I am wanting to pass is actually a property of the form I am in when I create the object, I get an error saying something like 'ALIAS THIS NOT FOUND'.
>
>The command I am using is:
>
> This.oPickList = CREATEOBJECT('dcspicklist',This.cdbfName,This.cKey)
>
>The second parameter is the one I want to pass by reference. Any ideas?
>
>Thanks.
>
>Randy
lcTempKey = this.cKey
lcdbfName = this.cdbfName
oCreate = createobject('dcspicklist',@lcdbfName,@lcTempKey)
this.cKey = lcTempKey
this.cdbfName = lcdbfName