Results 1 to 9 of 9

Thread: [RESOLVED] help me please..

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Location
    Huh?! I dunno where am i now!!
    Posts
    5

    Resolved [RESOLVED] help me please..

    hello...i wanna ask some question..
    i have two form (form1=index and form2=main) in form1 there is an textbox and in form2 there is a label..if user enter a string data in textbox..the string will appeared in label..so the conclusion is how to get data from textbox in form1 and appeared in label in form2..
    THX..

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: help me please..

    Welcome to VBForums, SiCK
    VB Code:
    1. 'in form1
    2.  
    3. 'if TextBox's name is Text1
    4. Private Sub Text1_Change()
    5.     main.labelName.Caption = Me.Text1.Text
    6. End Sub

  3. #3
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: help me please..

    VB Code:
    1. Form2.Label1.Caption = Me.TextBox.Text

    You could try that in the TextBox Chage event.

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Location
    Huh?! I dunno where am i now!!
    Posts
    5

    Re: help me please..

    sorry im forget..so the conclusion is how to get data from textbox in form1 and appeared in label in form2 if user click the command button..

  5. #5
    Fanatic Member
    Join Date
    Aug 2005
    Posts
    606

    Re: help me please..

    Quote Originally Posted by SiCK
    sorry im forget..so the conclusion is how to get data from textbox in form1 and appeared in label in form2 if user click the command button..
    in the click event

    VB Code:
    1. Form2.Label1.text = Text?.Text
    2. Form2.Show
    Last edited by crater; Nov 5th, 2006 at 08:45 PM.

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2006
    Location
    Huh?! I dunno where am i now!!
    Posts
    5

    Re: help me please..

    thx...it's solved

  7. #7
    Addicted Member
    Join Date
    Jun 2006
    Posts
    136

    Re: help me please..

    if the problem has been solved then mark this thread as resolved

  8. #8
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236

    Re: help me please..

    Quote Originally Posted by crater
    in the click event

    VB Code:
    1. Form2.Label1.text = Text?.Text
    2. Form2.Show
    Labels don't have Text that have a Caption.
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

  9. #9
    Junior Member
    Join Date
    Nov 2005
    Location
    London
    Posts
    23

    Re: help me please..

    would it be something like...

    VB Code:
    1. Command1_Click()
    2. form2.label2.caption = form1.textbox.text

    just a wild guess sorry if it dont help

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