Click to See Complete Forum and Search --> : Talking Forms
vbstudent
Dec 8th, 1999, 04:58 AM
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
jritchie
Dec 8th, 1999, 07:13 AM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.