Results 1 to 2 of 2

Thread: Talking Forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Location
    Richmond, VA, USA
    Posts
    4

    Post

    How do I get one form to talk to another? I am using VB5 and I want my password Login form to load a click event on the main form. I have a Boolean if then equation using a query def to check my password. If it is true I want the text boxes in the main form to load the users data. So if true then ??What??
    Thanks

  2. #2
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Ok if the forms are in the same project dead easy.
    In form one
    txtusername = what the user types in
    '
    ' You could open a record of courses and
    ' results as an example
    '
    rsCourse = db.openrecordset.....
    load form2
    '
    ' Here you can add anything you want to form2 because it is not yet displayed but stored in memory
    '
    form2.txtname = txtusername
    rsCourse.MoveFirst
    do
    form2.cboCourse.AddItem rsCourse!Name
    rsCourse.MoveNext
    If rsCourse.EOF Then Exit Do
    Loop
    '
    ' Finally show the second form
    '
    form2.show (whatever model here)

    Hope this helps

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