Results 1 to 6 of 6

Thread: from form to, well... form

  1. #1

    Thread Starter
    Addicted Member stealmysanity's Avatar
    Join Date
    Oct 2001
    Location
    THELANDOFRULERS
    Posts
    165

    Red face from form to, well... form

    Hi yall Im working on a project and am havin some trouble. I have one question. How do i make information carry over from one form to another? For example I want u to be able to ennter ur age and i want the program to be able to talk about your input on different forms. PLEAS HELP!!!!!
    everything is made of carbon, except some stuff!!BTW LOOK AT ME PROFILE!!

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    You can create public variables and put the data in them, like this

    Form1 Code
    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3. strName = Text1.Text
    4. Form2.Show
    5.  
    6. End Sub
    7.  
    8. Private Sub Form_Load()
    9.  
    10. Text1.Text = "Enter your name.."
    11. Text1.SelStart = 0
    12. Text1.SelLength = Len(Text1.Text)
    13.  
    14. End Sub
    In a module
    VB Code:
    1. Public strName As String
    Form2 code
    VB Code:
    1. Private Sub Form_Load()
    2.  
    3. Label1.Caption = "Your name is " & strName
    4.  
    5. End Sub

  3. #3

    Thread Starter
    Addicted Member stealmysanity's Avatar
    Join Date
    Oct 2001
    Location
    THELANDOFRULERS
    Posts
    165
    thax homey
    everything is made of carbon, except some stuff!!BTW LOOK AT ME PROFILE!!

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    oooppss ... almost missed it Chris (4k barrier)

    finally I can go to szzzzzzzzzzzzZZZZZZZZZZZZZzzzzzzzzzzleep
    -= a peet post =-

  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    Originally posted by peet
    oooppss ... almost missed it Chris (4k barrier)
    finally I can go to szzzzzzzzzzzzZZZZZZZZZZZZZzzzzzzzzzzleep
    night peet, thanks for the support

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    damn.. have to wash my chear leader equipment first

    GO Chris GO GO GO... *a little bit of jumping* more GO GO ...

    night all
    -= a peet post =-

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