hai i got an error in my coding,The error is expression expected . Please advice me how i am to correct my coding.Here is my coding which is connected to database
In my coding , i create 3 testbox which is txtusername.text, txtpassword.text and txtdepartment.text
. User must key in they username ,password and their department in the login page, if the user department is Admin then he will access into
admin page and if user department is store then he will access into store page. I am still new beginner in this
vb language and for your info
i am using visual studio 2005 and sql 2005.Here is my code and my interface
Code:
Public Class Form1
Dim r = Me.StaffTableAdapter
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click
Dim r = Me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)
If r me.txtdepartment.text is Caunter Then
counter.Show()
else if
me.txtdepartment.Text is Admin Then
Admin.Show()
else if
me.txtdepartment.text is store then
store.Show()
End If
MsgBox("invalid username and password")
End Sub