Results 1 to 5 of 5

Thread: Forms

  1. #1

    Thread Starter
    Hyperactive Member nickwrs's Avatar
    Join Date
    Jan 2000
    Location
    Atlanta, Ga
    Posts
    398

    Post

    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.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    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?

  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    isn't it:
    Code:
    Form1!Text1.Text = "Whatever"
    ------------------
    DiGiTaIErRoR

  4. #4
    Hyperactive Member Gimpster's Avatar
    Join Date
    Oct 1999
    Location
    Redmond, WA 98052
    Posts
    331

    Post

    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

  5. #5
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    New Jersey
    Posts
    334

    Post

    Actually, both ways work. I always do it Digital's way.

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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width