473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to read text from childMdi form textbox?

If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form.
How could I read the text in a textbox of a child mdi form
from a sub in the parent form?

TIA
Adda
Nov 20 '05 #1
16 3831
Hi,

Dim frmChild As Form2

For Each frmChild In Me.MdiChildren

Debug.WriteLine(frmChild.TextBox1.Text)

Next

Ken

---------------------

"Adda" <an*******@discussions.microsoft.com> wrote in message
news:19*****************************@phx.gbl...
If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form.
How could I read the text in a textbox of a child mdi form
from a sub in the parent form?

TIA
Adda

Nov 20 '05 #2
Hi,

Dim frmChild As Form2

For Each frmChild In Me.MdiChildren

Debug.WriteLine(frmChild.TextBox1.Text)

Next

Ken

---------------------

"Adda" <an*******@discussions.microsoft.com> wrote in message
news:19*****************************@phx.gbl...
If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form.
How could I read the text in a textbox of a child mdi form
from a sub in the parent form?

TIA
Adda

Nov 20 '05 #3
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I
can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but
the new row doesn't show up in the datagrid on the parent
form until after I do a dataset.clear, dataAdatapter.Fill
(dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the
new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?

Thank you again for your reply.
Adda

-----Original Message-----
Hi,

Dim frmChild As Form2

For Each frmChild In Me.MdiChildren

Debug.WriteLine(frmChild.TextBox1.Text)

Next

Ken

---------------------

"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:19*****************************@phx.gbl...
If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form. How could I read the text in a textbox of a child mdi form from a sub in the parent form?

TIA
Adda

.

Nov 20 '05 #4
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I
can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but
the new row doesn't show up in the datagrid on the parent
form until after I do a dataset.clear, dataAdatapter.Fill
(dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the
new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?

Thank you again for your reply.
Adda

-----Original Message-----
Hi,

Dim frmChild As Form2

For Each frmChild In Me.MdiChildren

Debug.WriteLine(frmChild.TextBox1.Text)

Next

Ken

---------------------

"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:19*****************************@phx.gbl...
If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form. How could I read the text in a textbox of a child mdi form from a sub in the parent form?

TIA
Adda

.

Nov 20 '05 #5
Hi,

post your code.

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in message
news:16*****************************@phx.gbl...
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I
can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but
the new row doesn't show up in the datagrid on the parent
form until after I do a dataset.clear, dataAdatapter.Fill
(dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the
new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?

Thank you again for your reply.
Adda

-----Original Message-----
Hi,

Dim frmChild As Form2

For Each frmChild In Me.MdiChildren

Debug.WriteLine(frmChild.TextBox1.Text)

Next

Ken

---------------------

"Adda" <an*******@discussions.microsoft.com> wrote in

message
news:19*****************************@phx.gbl...
If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form. How could I read the text in a textbox of a child mdi form from a sub in the parent form?

TIA
Adda

.

Nov 20 '05 #6
Hi,

post your code.

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in message
news:16*****************************@phx.gbl...
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I
can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but
the new row doesn't show up in the datagrid on the parent
form until after I do a dataset.clear, dataAdatapter.Fill
(dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the
new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?

Thank you again for your reply.
Adda

-----Original Message-----
Hi,

Dim frmChild As Form2

For Each frmChild In Me.MdiChildren

Debug.WriteLine(frmChild.TextBox1.Text)

Next

Ken

---------------------

"Adda" <an*******@discussions.microsoft.com> wrote in

message
news:19*****************************@phx.gbl...
If I cycle through the MdiChildActivate event of the
parent form I can read text in a textbox on the child
mdiform --

console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)

But if I have a sub in the Parent form and reference a
child mdi form like this:

Sub ReadText()
Dim frm As New Form2
console.writeline(frm.txt1.text)
End Sub

--I can't read the text in the textbox of the child form. How could I read the text in a textbox of a child mdi form from a sub in the parent form?

TIA
Adda

.

Nov 20 '05 #7
Sorry, had to step away for a couple of hours. Not at my
desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
....
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
....
----------------------------------------------
--in the Child Form---------------------------
....
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I
could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform
it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

-----Original Message-----
Hi,

post your code.

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:16*****************************@phx.gbl...
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but the new row doesn't show up in the datagrid on the parent form until after I do a dataset.clear, dataAdatapter.Fill (dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?
Thank you again for your reply.
Adda

>-----Original Message-----
>Hi,
>
>Dim frmChild As Form2
>
>For Each frmChild In Me.MdiChildren
>
>Debug.WriteLine(frmChild.TextBox1.Text)
>
>Next
>
>
>
>Ken
>
>---------------------
>
>"Adda" <an*******@discussions.microsoft.com> wrote in

message
>news:19*****************************@phx.gbl...
>> If I cycle through the MdiChildActivate event of the
>> parent form I can read text in a textbox on the child
>> mdiform --
>>
>> console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)
>>
>> But if I have a sub in the Parent form and reference a >> child mdi form like this:
>>
>> Sub ReadText()
>> Dim frm As New Form2
>> console.writeline(frm.txt1.text)
>> End Sub
>>
>> --I can't read the text in the textbox of the child

form.
>> How could I read the text in a textbox of a child mdi

form
>> from a sub in the parent form?
>>
>> TIA
>> Adda
>
>
>.
>

.

Nov 20 '05 #8
Sorry, had to step away for a couple of hours. Not at my
desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
....
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
....
----------------------------------------------
--in the Child Form---------------------------
....
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I
could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform
it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

-----Original Message-----
Hi,

post your code.

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:16*****************************@phx.gbl...
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but the new row doesn't show up in the datagrid on the parent form until after I do a dataset.clear, dataAdatapter.Fill (dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?
Thank you again for your reply.
Adda

>-----Original Message-----
>Hi,
>
>Dim frmChild As Form2
>
>For Each frmChild In Me.MdiChildren
>
>Debug.WriteLine(frmChild.TextBox1.Text)
>
>Next
>
>
>
>Ken
>
>---------------------
>
>"Adda" <an*******@discussions.microsoft.com> wrote in

message
>news:19*****************************@phx.gbl...
>> If I cycle through the MdiChildActivate event of the
>> parent form I can read text in a textbox on the child
>> mdiform --
>>
>> console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)
>>
>> But if I have a sub in the Parent form and reference a >> child mdi form like this:
>>
>> Sub ReadText()
>> Dim frm As New Form2
>> console.writeline(frm.txt1.text)
>> End Sub
>>
>> --I can't read the text in the textbox of the child

form.
>> How could I read the text in a textbox of a child mdi

form
>> from a sub in the parent form?
>>
>> TIA
>> Adda
>
>
>.
>

.

Nov 20 '05 #9
Hi,

Try rebinding the datagrid. Datagrid1.Datasource = ds.tables(0)

Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in message
news:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at my
desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I
could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform
it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

-----Original Message-----
Hi,

post your code.

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in

message
news:16*****************************@phx.gbl...
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but the new row doesn't show up in the datagrid on the parent form until after I do a dataset.clear, dataAdatapter.Fill (dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?
Thank you again for your reply.
Adda
>-----Original Message-----
>Hi,
>
>Dim frmChild As Form2
>
>For Each frmChild In Me.MdiChildren
>
>Debug.WriteLine(frmChild.TextBox1.Text)
>
>Next
>
>
>
>Ken
>
>---------------------
>
>"Adda" <an*******@discussions.microsoft.com> wrote in
message
>news:19*****************************@phx.gbl...
>> If I cycle through the MdiChildActivate event of the
>> parent form I can read text in a textbox on the child
>> mdiform --
>>
>> console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)
>>
>> But if I have a sub in the Parent form and reference a >> child mdi form like this:
>>
>> Sub ReadText()
>> Dim frm As New Form2
>> console.writeline(frm.txt1.text)
>> End Sub
>>
>> --I can't read the text in the textbox of the child
form.
>> How could I read the text in a textbox of a child mdi
form
>> from a sub in the parent form?
>>
>> TIA
>> Adda
>
>
>.
>

.

Nov 20 '05 #10
Hi,

Try rebinding the datagrid. Datagrid1.Datasource = ds.tables(0)

Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in message
news:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at my
desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I
could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform
it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

-----Original Message-----
Hi,

post your code.

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in

message
news:16*****************************@phx.gbl...
Thank you. I also discovered that if I declare the
childform at the Form level of the Parent form as shared I can also read the text in the textbox.

While I am at it, what I am actually trying to do is to
refresh a datagrid on the parent form with data that I
enter in the child form. I pass a datarow object to the
child and populate it and then update the dataset with a
dataAdapter (using a button on the childform or an Add
menu selection from the parent form). This works fine but the new row doesn't show up in the datagrid on the parent form until after I do a dataset.clear, dataAdatapter.Fill (dataset, "tbl1") on the parent form from a menu event o
the Parent. Could you suggest a way that I could make the new row show up in the datagrid when in the same event
that I update the dataset with the data from the childform?
Thank you again for your reply.
Adda
>-----Original Message-----
>Hi,
>
>Dim frmChild As Form2
>
>For Each frmChild In Me.MdiChildren
>
>Debug.WriteLine(frmChild.TextBox1.Text)
>
>Next
>
>
>
>Ken
>
>---------------------
>
>"Adda" <an*******@discussions.microsoft.com> wrote in
message
>news:19*****************************@phx.gbl...
>> If I cycle through the MdiChildActivate event of the
>> parent form I can read text in a textbox on the child
>> mdiform --
>>
>> console.writeline(Me.ActiveMdiChild.Controls(1).Te xt)
>>
>> But if I have a sub in the Parent form and reference a >> child mdi form like this:
>>
>> Sub ReadText()
>> Dim frm As New Form2
>> console.writeline(frm.txt1.text)
>> End Sub
>>
>> --I can't read the text in the textbox of the child
form.
>> How could I read the text in a textbox of a child mdi
form
>> from a sub in the parent form?
>>
>> TIA
>> Adda
>
>
>.
>

.

Nov 20 '05 #11
I did try that, but still the datagrid on the parent form
did not refresh on dataAdapter.Update call. I also tried
using a separate thread (from the child form). The only
way the datagrid would refresh on the dataAdapter.Update
call is if I added the new data in the parent form
(hardcoded data for now). This is why I was trying to
read the data from the childform to the parent form. I am
sure there is a way to refresh the datagrid from the
childform - just obscure right now.

Any suggestions welcome. And thank you again for all your
replies.

Adda
-----Original Message-----
Hi,

Try rebinding the datagrid. Datagrid1.Datasource = ds.tables(0)
Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at my desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

>-----Original Message-----
>Hi,
>
> post your code.
>
>Ken
>-----------
>"Adda" <an*******@discussions.microsoft.com> wrote in

message
>news:16*****************************@phx.gbl...
>> Thank you. I also discovered that if I declare the
>> childform at the Form level of the Parent form as

shared I
>> can also read the text in the textbox.
>>
>> While I am at it, what I am actually trying to do is to >> refresh a datagrid on the parent form with data that I >> enter in the child form. I pass a datarow object to the >> child and populate it and then update the dataset with a >> dataAdapter (using a button on the childform or an Add >> menu selection from the parent form). This works fine
but
>> the new row doesn't show up in the datagrid on the

parent
>> form until after I do a dataset.clear,

dataAdatapter.Fill
>> (dataset, "tbl1") on the parent form from a menu
event o >> the Parent. Could you suggest a way that I could make the
>> new row show up in the datagrid when in the same
event >> that I update the dataset with the data from the

childform?
>>
>> Thank you again for your reply.
>> Adda
>>
>>
>> >-----Original Message-----
>> >Hi,
>> >
>> >Dim frmChild As Form2
>> >
>> >For Each frmChild In Me.MdiChildren
>> >
>> >Debug.WriteLine(frmChild.TextBox1.Text)
>> >
>> >Next
>> >
>> >
>> >
>> >Ken
>> >
>> >---------------------
>> >
>> >"Adda" <an*******@discussions.microsoft.com> wrote in >> message
>> >news:19*****************************@phx.gbl...
>> >> If I cycle through the MdiChildActivate event of the >> >> parent form I can read text in a textbox on the child >> >> mdiform --
>> >>
>> >> console.writeline(Me.ActiveMdiChild.Controls (1).Text) >> >>
>> >> But if I have a sub in the Parent form and reference a
>> >> child mdi form like this:
>> >>
>> >> Sub ReadText()
>> >> Dim frm As New Form2
>> >> console.writeline(frm.txt1.text)
>> >> End Sub
>> >>
>> >> --I can't read the text in the textbox of the

child >> form.
>> >> How could I read the text in a textbox of a child mdi >> form
>> >> from a sub in the parent form?
>> >>
>> >> TIA
>> >> Adda
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 20 '05 #12
I did try that, but still the datagrid on the parent form
did not refresh on dataAdapter.Update call. I also tried
using a separate thread (from the child form). The only
way the datagrid would refresh on the dataAdapter.Update
call is if I added the new data in the parent form
(hardcoded data for now). This is why I was trying to
read the data from the childform to the parent form. I am
sure there is a way to refresh the datagrid from the
childform - just obscure right now.

Any suggestions welcome. And thank you again for all your
replies.

Adda
-----Original Message-----
Hi,

Try rebinding the datagrid. Datagrid1.Datasource = ds.tables(0)
Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at my desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

>-----Original Message-----
>Hi,
>
> post your code.
>
>Ken
>-----------
>"Adda" <an*******@discussions.microsoft.com> wrote in

message
>news:16*****************************@phx.gbl...
>> Thank you. I also discovered that if I declare the
>> childform at the Form level of the Parent form as

shared I
>> can also read the text in the textbox.
>>
>> While I am at it, what I am actually trying to do is to >> refresh a datagrid on the parent form with data that I >> enter in the child form. I pass a datarow object to the >> child and populate it and then update the dataset with a >> dataAdapter (using a button on the childform or an Add >> menu selection from the parent form). This works fine
but
>> the new row doesn't show up in the datagrid on the

parent
>> form until after I do a dataset.clear,

dataAdatapter.Fill
>> (dataset, "tbl1") on the parent form from a menu
event o >> the Parent. Could you suggest a way that I could make the
>> new row show up in the datagrid when in the same
event >> that I update the dataset with the data from the

childform?
>>
>> Thank you again for your reply.
>> Adda
>>
>>
>> >-----Original Message-----
>> >Hi,
>> >
>> >Dim frmChild As Form2
>> >
>> >For Each frmChild In Me.MdiChildren
>> >
>> >Debug.WriteLine(frmChild.TextBox1.Text)
>> >
>> >Next
>> >
>> >
>> >
>> >Ken
>> >
>> >---------------------
>> >
>> >"Adda" <an*******@discussions.microsoft.com> wrote in >> message
>> >news:19*****************************@phx.gbl...
>> >> If I cycle through the MdiChildActivate event of the >> >> parent form I can read text in a textbox on the child >> >> mdiform --
>> >>
>> >> console.writeline(Me.ActiveMdiChild.Controls (1).Text) >> >>
>> >> But if I have a sub in the Parent form and reference a
>> >> child mdi form like this:
>> >>
>> >> Sub ReadText()
>> >> Dim frm As New Form2
>> >> console.writeline(frm.txt1.text)
>> >> End Sub
>> >>
>> >> --I can't read the text in the textbox of the

child >> form.
>> >> How could I read the text in a textbox of a child mdi >> form
>> >> from a sub in the parent form?
>> >>
>> >> TIA
>> >> Adda
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 20 '05 #13
One other interesting thing I noticed if I add new data
from the parent form (which does successfully update and
refresh the datagrid as I desire) is that if I have
multiple childforms loaded, 1) I can only read data from
the forms if I loop through the childforms collection 2)
the data is read from each childform in the order that
each form is opened - like if I have child0, child1,
child2 I will pick up the data in child2 form from the
Parent form and then successfully update the dataset and
successfully refresh the datagrid.

I hope to find a way to refresh the datagrid in the parent
form from the the childform.
-----Original Message-----
Hi,

Try rebinding the datagrid. Datagrid1.Datasource = ds.tables(0)
Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at my desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

>-----Original Message-----
>Hi,
>
> post your code.
>
>Ken
>-----------
>"Adda" <an*******@discussions.microsoft.com> wrote in

message
>news:16*****************************@phx.gbl...
>> Thank you. I also discovered that if I declare the
>> childform at the Form level of the Parent form as

shared I
>> can also read the text in the textbox.
>>
>> While I am at it, what I am actually trying to do is to >> refresh a datagrid on the parent form with data that I >> enter in the child form. I pass a datarow object to the >> child and populate it and then update the dataset with a >> dataAdapter (using a button on the childform or an Add >> menu selection from the parent form). This works fine
but
>> the new row doesn't show up in the datagrid on the

parent
>> form until after I do a dataset.clear,

dataAdatapter.Fill
>> (dataset, "tbl1") on the parent form from a menu
event o >> the Parent. Could you suggest a way that I could make the
>> new row show up in the datagrid when in the same
event >> that I update the dataset with the data from the

childform?
>>
>> Thank you again for your reply.
>> Adda
>>
>>
>> >-----Original Message-----
>> >Hi,
>> >
>> >Dim frmChild As Form2
>> >
>> >For Each frmChild In Me.MdiChildren
>> >
>> >Debug.WriteLine(frmChild.TextBox1.Text)
>> >
>> >Next
>> >
>> >
>> >
>> >Ken
>> >
>> >---------------------
>> >
>> >"Adda" <an*******@discussions.microsoft.com> wrote in >> message
>> >news:19*****************************@phx.gbl...
>> >> If I cycle through the MdiChildActivate event of the >> >> parent form I can read text in a textbox on the child >> >> mdiform --
>> >>
>> >> console.writeline(Me.ActiveMdiChild.Controls (1).Text) >> >>
>> >> But if I have a sub in the Parent form and reference a
>> >> child mdi form like this:
>> >>
>> >> Sub ReadText()
>> >> Dim frm As New Form2
>> >> console.writeline(frm.txt1.text)
>> >> End Sub
>> >>
>> >> --I can't read the text in the textbox of the

child >> form.
>> >> How could I read the text in a textbox of a child mdi >> form
>> >> from a sub in the parent form?
>> >>
>> >> TIA
>> >> Adda
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 20 '05 #14
One other interesting thing I noticed if I add new data
from the parent form (which does successfully update and
refresh the datagrid as I desire) is that if I have
multiple childforms loaded, 1) I can only read data from
the forms if I loop through the childforms collection 2)
the data is read from each childform in the order that
each form is opened - like if I have child0, child1,
child2 I will pick up the data in child2 form from the
Parent form and then successfully update the dataset and
successfully refresh the datagrid.

I hope to find a way to refresh the datagrid in the parent
form from the the childform.
-----Original Message-----
Hi,

Try rebinding the datagrid. Datagrid1.Datasource = ds.tables(0)
Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in messagenews:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at my desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda

>-----Original Message-----
>Hi,
>
> post your code.
>
>Ken
>-----------
>"Adda" <an*******@discussions.microsoft.com> wrote in

message
>news:16*****************************@phx.gbl...
>> Thank you. I also discovered that if I declare the
>> childform at the Form level of the Parent form as

shared I
>> can also read the text in the textbox.
>>
>> While I am at it, what I am actually trying to do is to >> refresh a datagrid on the parent form with data that I >> enter in the child form. I pass a datarow object to the >> child and populate it and then update the dataset with a >> dataAdapter (using a button on the childform or an Add >> menu selection from the parent form). This works fine
but
>> the new row doesn't show up in the datagrid on the

parent
>> form until after I do a dataset.clear,

dataAdatapter.Fill
>> (dataset, "tbl1") on the parent form from a menu
event o >> the Parent. Could you suggest a way that I could make the
>> new row show up in the datagrid when in the same
event >> that I update the dataset with the data from the

childform?
>>
>> Thank you again for your reply.
>> Adda
>>
>>
>> >-----Original Message-----
>> >Hi,
>> >
>> >Dim frmChild As Form2
>> >
>> >For Each frmChild In Me.MdiChildren
>> >
>> >Debug.WriteLine(frmChild.TextBox1.Text)
>> >
>> >Next
>> >
>> >
>> >
>> >Ken
>> >
>> >---------------------
>> >
>> >"Adda" <an*******@discussions.microsoft.com> wrote in >> message
>> >news:19*****************************@phx.gbl...
>> >> If I cycle through the MdiChildActivate event of the >> >> parent form I can read text in a textbox on the child >> >> mdiform --
>> >>
>> >> console.writeline(Me.ActiveMdiChild.Controls (1).Text) >> >>
>> >> But if I have a sub in the Parent form and reference a
>> >> child mdi form like this:
>> >>
>> >> Sub ReadText()
>> >> Dim frm As New Form2
>> >> console.writeline(frm.txt1.text)
>> >> End Sub
>> >>
>> >> --I can't read the text in the textbox of the

child >> form.
>> >> How could I read the text in a textbox of a child mdi >> form
>> >> from a sub in the parent form?
>> >>
>> >> TIA
>> >> Adda
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 20 '05 #15
Hi,

Private Sub btnAdd(...)...
Dim frm As Parentfrm = Me.Parent
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in message
news:15*****************************@phx.gbl...
One other interesting thing I noticed if I add new data
from the parent form (which does successfully update and
refresh the datagrid as I desire) is that if I have
multiple childforms loaded, 1) I can only read data from
the forms if I loop through the childforms collection 2)
the data is read from each childform in the order that
each form is opened - like if I have child0, child1,
child2 I will pick up the data in child2 form from the
Parent form and then successfully update the dataset and
successfully refresh the datagrid.

I hope to find a way to refresh the datagrid in the parent
form from the the childform.
-----Original Message-----
Hi,

Try rebinding the datagrid. Datagrid1.Datasource

= ds.tables(0)

Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in

message
news:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at

my desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda
>-----Original Message-----
>Hi,
>
> post your code.
>
>Ken
>-----------
>"Adda" <an*******@discussions.microsoft.com> wrote in
message
>news:16*****************************@phx.gbl...
>> Thank you. I also discovered that if I declare the
>> childform at the Form level of the Parent form as
shared I
>> can also read the text in the textbox.
>>
>> While I am at it, what I am actually trying to do is to >> refresh a datagrid on the parent form with data that I >> enter in the child form. I pass a datarow object to the >> child and populate it and then update the dataset with a >> dataAdapter (using a button on the childform or an Add >> menu selection from the parent form). This works fine but
>> the new row doesn't show up in the datagrid on the
parent
>> form until after I do a dataset.clear,
dataAdatapter.Fill
>> (dataset, "tbl1") on the parent form from a menu event o >> the Parent. Could you suggest a way that I could make the
>> new row show up in the datagrid when in the same event >> that I update the dataset with the data from the
childform?
>>
>> Thank you again for your reply.
>> Adda
>>
>>
>> >-----Original Message-----
>> >Hi,
>> >
>> >Dim frmChild As Form2
>> >
>> >For Each frmChild In Me.MdiChildren
>> >
>> >Debug.WriteLine(frmChild.TextBox1.Text)
>> >
>> >Next
>> >
>> >
>> >
>> >Ken
>> >
>> >---------------------
>> >
>> >"Adda" <an*******@discussions.microsoft.com> wrote in >> message
>> >news:19*****************************@phx.gbl...
>> >> If I cycle through the MdiChildActivate event of the >> >> parent form I can read text in a textbox on the child >> >> mdiform --
>> >>
>> >> console.writeline(Me.ActiveMdiChild.Controls (1).Text) >> >>
>> >> But if I have a sub in the Parent form and reference a
>> >> child mdi form like this:
>> >>
>> >> Sub ReadText()
>> >> Dim frm As New Form2
>> >> console.writeline(frm.txt1.text)
>> >> End Sub
>> >>
>> >> --I can't read the text in the textbox of the child >> form.
>> >> How could I read the text in a textbox of a child mdi >> form
>> >> from a sub in the parent form?
>> >>
>> >> TIA
>> >> Adda
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 20 '05 #16
Hi,

Private Sub btnAdd(...)...
Dim frm As Parentfrm = Me.Parent
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub

Ken
-----------
"Adda" <an*******@discussions.microsoft.com> wrote in message
news:15*****************************@phx.gbl...
One other interesting thing I noticed if I add new data
from the parent form (which does successfully update and
refresh the datagrid as I desire) is that if I have
multiple childforms loaded, 1) I can only read data from
the forms if I loop through the childforms collection 2)
the data is read from each childform in the order that
each form is opened - like if I have child0, child1,
child2 I will pick up the data in child2 form from the
Parent form and then successfully update the dataset and
successfully refresh the datagrid.

I hope to find a way to refresh the datagrid in the parent
form from the the childform.
-----Original Message-----
Hi,

Try rebinding the datagrid. Datagrid1.Datasource

= ds.tables(0)

Ken
----------
"Adda" <an*******@discussions.microsoft.com> wrote in

message
news:19*****************************@phx.gbl...
Sorry, had to step away for a couple of hours. Not at

my desk right now, but the code goes something like the
following:

--in the parent form--------------------

Public Class Parentfrm
Dim ddRow As DataRow
...
Public Property dRow() As DataRow
Get
Return ddRow
End Get
Set(ByVal Value As DataRow)
ddRow = Value
End Set
End Property

Public Sub AddRow()
dataset1.Tables("tbl1").Rows.Add(ddRow)
dataAdapter1.Update(dataset1, "tbl1")
Me.Refresh
'how to refresh datagrid1?
End Sub
...
----------------------------------------------
--in the Child Form---------------------------
...
Private Sub btnAdd(...)...
Dim frm As New Parentfrm
frm.dRow = frm.dataset1.Tables("tbl1").NewRow
frm.dRow(0) = txt0.Text
frm.dRow(1) = txt1.Text
frm.AddRow()
End Sub
-----------------------------------------------

tbl1 resides in a sql Server database. The data is
getting stored correctly. But the new row does not show
up in datagrid1 until I click on a menu event on the
parent form

---------------------------------------------
Private Sub mnuRefresh(...)...
dataset1.clear()
dataAdapter1.Fill(dataset1, "tbl1")
End Sub
-----------------------------------------------

now the new row shows up in datagrid1. I am hoping that I could accomplish this when I do dataAdapter.Update(...).
If I perform this operation from Parentfrm datagrid1
updates automatically. But if I do it from the childform it does not.

Any suggestions greatly appreciated on how to get
datagrid1 to update automatically when adding data from
the childform. Thank you very much for your help.

Adda
>-----Original Message-----
>Hi,
>
> post your code.
>
>Ken
>-----------
>"Adda" <an*******@discussions.microsoft.com> wrote in
message
>news:16*****************************@phx.gbl...
>> Thank you. I also discovered that if I declare the
>> childform at the Form level of the Parent form as
shared I
>> can also read the text in the textbox.
>>
>> While I am at it, what I am actually trying to do is to >> refresh a datagrid on the parent form with data that I >> enter in the child form. I pass a datarow object to the >> child and populate it and then update the dataset with a >> dataAdapter (using a button on the childform or an Add >> menu selection from the parent form). This works fine but
>> the new row doesn't show up in the datagrid on the
parent
>> form until after I do a dataset.clear,
dataAdatapter.Fill
>> (dataset, "tbl1") on the parent form from a menu event o >> the Parent. Could you suggest a way that I could make the
>> new row show up in the datagrid when in the same event >> that I update the dataset with the data from the
childform?
>>
>> Thank you again for your reply.
>> Adda
>>
>>
>> >-----Original Message-----
>> >Hi,
>> >
>> >Dim frmChild As Form2
>> >
>> >For Each frmChild In Me.MdiChildren
>> >
>> >Debug.WriteLine(frmChild.TextBox1.Text)
>> >
>> >Next
>> >
>> >
>> >
>> >Ken
>> >
>> >---------------------
>> >
>> >"Adda" <an*******@discussions.microsoft.com> wrote in >> message
>> >news:19*****************************@phx.gbl...
>> >> If I cycle through the MdiChildActivate event of the >> >> parent form I can read text in a textbox on the child >> >> mdiform --
>> >>
>> >> console.writeline(Me.ActiveMdiChild.Controls (1).Text) >> >>
>> >> But if I have a sub in the Parent form and reference a
>> >> child mdi form like this:
>> >>
>> >> Sub ReadText()
>> >> Dim frm As New Form2
>> >> console.writeline(frm.txt1.text)
>> >> End Sub
>> >>
>> >> --I can't read the text in the textbox of the child >> form.
>> >> How could I read the text in a textbox of a child mdi >> form
>> >> from a sub in the parent form?
>> >>
>> >> TIA
>> >> Adda
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 20 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: James Norton-Jones | last post by:
Hi, Am I trying to hold the data of a DataGrid in a label so that when the form is reposted the DataGrid can be repopulated. The problem I am having is that I don't understand how to get the...
16
by: Adda | last post by:
If I cycle through the MdiChildActivate event of the parent form I can read text in a textbox on the child mdiform -- console.writeline(Me.ActiveMdiChild.Controls(1).Text) But if I have a sub...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.