-
I do not know how to have one form acess an object on another form.
I need to be able to acess a text box and the mscomm control from my second form, and also from a class.
ie in my class I am trying to manipulate the values of the text box in my main form.
But in neither case does it work.
Why can't I do this?
Is there a way around this?
Am I just coding it wrong?
If one of you wonderful people could show me the error of my ways, I would forever be indebted to you.
-
From your class or other form you should be able to say something like Form2.Text1.Text = "Hi"
------------------
Marty
Can you buy an entire chess set in a pawn shop?
-
isn't it:
Code:
Form1!Text1.Text = "Whatever"
------------------
DiGiTaIErRoR
-
No, DigitalError, that is for when you are accessing a database. For just plain forms where you want to access an object on another form, then you would do what Marty said.
------------------
Ryan
-
Actually, both ways work. I always do it Digital's way.
------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com