Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

VS 2010 help!

$
0
0
Attachment 95465

this is my form1, can any1 help me with the login form here, i want to make it in such a way that
if login=s1002 and password=pass123, it will open form2
if login=s2002 and password=pass123, it will open form3
if login=s3003 and password=pass123, it will open form4

so this is my current code to open form2
Code:

Private Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
        If TextBoxLogin== "s1001" && TextBoxPassword=="pass123"
            Dim theform As New Form2
            theform.ShowDialog()
        End If
    End Sub
End Class

the submit_click is the submit button, and i got a expression expected error at the "=" from
Code:

If TextBoxLogin== "s1001"
can any1 help me to correct the error and check whether i am doing it correctly?
Attached Images
 

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>