Click to See Complete Forum and Search --> : Help!


ant
June 17th, 2001, 11:35 AM
i have a program, that when you click on a command button it takes the text from 2 different textboxes in 2 different forms and combines them into 1 richtextbox on another form. so far i have a code like this:


Dim f as Form7
set f = new Form7
f.richtextbox1.text = form3.richtextbox1.text & form4.richtextbox`.text
f.show



I also have a command that creates a new form
The problem is when i click on the button, it creates a new form, but it doesn't
combine the 2 text boxes and put the text in the new textbox in the form.
What's wrong??


--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: cgeorge@thevortex.com
for the address

John G Duffy
June 17th, 2001, 03:07 PM
I tried your sample with no problems. Created a 2 form project (Form1 and Form2) added Richtextboxes to both. added this code to Form1
The data from Both richtextboxes showed on form "N"
' code from Form1

option Explicit

private Sub Command1_Click()
Dim n as Form1
set n = new Form1
n.RichTextBox1 = Form1.RichTextBox1.Text & Form2.RichTextBox1.Text
n.Show
End Sub

private Sub Form_Unload(Cancel as Integer)
Dim f as Form
for Each f In Forms
Unload f
next f
End Sub




John G

ant
June 17th, 2001, 03:50 PM
But the forms are MDI Forms

--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: cgeorge@thevortex.com
for the address

ant
June 17th, 2001, 03:50 PM
But the forms are MDI child Forms

--Ant
--------------------------------------------------
check out my newest freeware
E-mail me at: cgeorge@thevortex.com
for the address

John G Duffy
June 17th, 2001, 04:59 PM
Should not make any difference but I will try that and see if there is a problem.

John G