PDA

Click to See Complete Forum and Search --> : Forms


nickwrs
Jan 21st, 2000, 07:20 AM
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.

MartinLiss
Jan 21st, 2000, 07:24 AM
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?

DiGiTaIErRoR
Jan 21st, 2000, 09:39 PM
isn't it:

Form1!Text1.Text = "Whatever"


------------------
DiGiTaIErRoR

Gimpster
Jan 22nd, 2000, 12:07 AM
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

spandex44
Jan 22nd, 2000, 12:10 AM
Actually, both ways work. I always do it Digital's way.

------------------
Regards,
Alexander McAndrew
VB Zone
http://gsenterprise.server101.com