If I have a second form that is a mdichild, let's say frm2 and I want to
update a textbox control pragmatically...

In my MDI parent, I open 5 instances

Dim f as new frm2

private sub OpenForm()
for i = 0 to 4
f = new frm2
f.mdiparent = me
f.show
end sub

Now, from my parent, I want to update a textbox1 in the active mdi child,
how can I? When I just try f.textbox1.text = "some text" it updates the
control on the last handle created. I tried finding the active child but
couldn't determine how to go from there after I got it.

Any help and links would be great.

Regards,
Brian

Re: MDI Child Controls by Brian

Brian
Sun Sep 18 01:07:27 CDT 2005

Never mind...... It's too late to be doing this....

childForm = Me.ActiveMdiChild
DirectCast(childForm, frm2).textbox1.text = "Some Text"


Thanks,
Brian



"Brian P. Hammer" <NoSpam@LotsOf.It> wrote in message
news:%23lpGSVBvFHA.2948@TK2MSFTNGP15.phx.gbl...
> If I have a second form that is a mdichild, let's say frm2 and I want to
> update a textbox control pragmatically...
>
> In my MDI parent, I open 5 instances
>
> Dim f as new frm2
>
> private sub OpenForm()
> for i = 0 to 4
> f = new frm2
> f.mdiparent = me
> f.show
> end sub
>
> Now, from my parent, I want to update a textbox1 in the active mdi child,
> how can I? When I just try f.textbox1.text = "some text" it updates the
> control on the last handle created. I tried finding the active child but
> couldn't determine how to go from there after I got it.
>
> Any help and links would be great.
>
> Regards,
> Brian
>