On form2 I have set Public username as String. On frmlogin this is the code for the ok button when you type in the username and passwoed. If txtpassword.text = frmlogin.tag Then Dim secondforum As New Form2 secondform.username = txtusername.text secondform.show me.hide Else msgbox "Try Again" End If On form2 under Forum Load I have form2.caption = username For some reason the username does not go over to form2. I tried to use F8 to see if the username was being seen in Public username as String but for some reason when in F8 mode it won't skip over to the second form code so I can hover over it with mouse and check. *EDIT* Ok I got it to work not sure what did it though. But aftering changing secondform.username = txtusername.text to secondform.username = me.txtusername.text it worked. And on form2 useing me.caption = username. Thank you for the help! -- modified at 19:05 Monday 6th March, 2006
P
Phippsp
@Phippsp
Posts
-
Sending info from Form1 to Form2 -
Sending info from Form1 to Form2frmlogin has txtusername.text and txtpassword.text. I would like to take the text that is put into the txtusername.text and send it over to form2 once I hide frmlogin and show form2. I have tried this and failed. Public user as string user = txtusername.text This does not work when I try to put user into form2. So how would I go about this? Thank You -- modified at 18:26 Monday 6th March, 2006