Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Do form xx with this - is that the best way ??

A very silly question I know
I have a form then from a command button I open another form (modal, default
data session) this form lets me select some text which I then replace into
the view then I close the form, from here I need to update the text box on
this form with the selection, I presume I open the modal form i.e.

Do form XX with this then call back with the refresh()

Is that the correct way or is there a better way?

Thanks

Paul
[493 byte] By [Paul Summerfield] at [2007-11-10 12:49:55]
# 1 Re: Do form xx with this - is that the best way ??
Paul,
You can do it that way but you need to pass THISFORM, not THIS from the
commandbutton. If you use THIS, you will get an object reference to the
button.

Another way to do it is to get a reference to _Screen.ActiveForm in the
modal form's Init or Load. This property holds a reference to the calling
form. The value doesn't change to the modal form itself until the modal
form's Activate event fires.

Regards.

--
Larry Miller
MCSD, Microsoft MVP Visual FoxPro
Bifrost Solutions

"Paul Summerfield" <foxy@quantumistic.co.uk> wrote in message
news:3ef9ba10$1@tnews.web.dev-archive.com...
>
> A very silly question I know
> I have a form then from a command button I open another form (modal,
default
> data session) this form lets me select some text which I then replace into
> the view then I close the form, from here I need to update the text box on
> this form with the selection, I presume I open the modal form i.e.
>
> Do form XX with this then call back with the refresh()
>
> Is that the correct way or is there a better way?
>
> Thanks
>
> Paul
>
>
Larry Miller at 2007-11-11 23:50:44 >