>>>Basically what I'm trying to do is operate controls in one form from another form. In form A I have a grid and in form B I'd like to issue commands that will control the grid that I have in form A.
>>>Sounds simple but I haven't been lucky to get the right command.
>>>They are separate forms, not components of a formset.
>>>Thanks,
>>>
>>>Gil
>>>
>>Hi Gil,
>>Forms need not be in a formset. They are objects too so you could reference one from other. When calling Form B also pass form A as an object reference.
>>In formA : Do form FormB with thisform
>>In formB init store formA's reference to a property:
>>
>>lparameters oFormRef
>>thisform.oCaller=oFormRef
>>
>>And anywhere in FormB issue commands that will act on FormA.grid :
>>
>>thisform.oCaller.grid1.column1.text1.value = "NewValue"
>>thisform.oCaller.grid1.refresh
>>wait window "Any key to setfocus to grid in FormA"
>>thisform.oCaller.grid1.setfocus()
>>
>
>Cetin, thanks a lot! That was exactly what I needed. I created the property, called the form, assigned the value to the property, issued my command and presto! smooth operation. Thanks a lot, I really appreciate the help and have a great happy new year!
>
>Gil
>
>I love this thread!
Hi Gill,
The reverse was a challenge for me when I started VFP (that is - do form formB, click on FormA, do something in FormB ). If you need also you get the reference by "do form formB name FormBRef".
Happy new year.