help how can i know if the user is not an admin

i have combo box in my combo box have a user or admin additem if he choose admin then all i want is to validate if the username and password is for admin user this is my code

Private Sub Form_Load()
Call Opencn
With Combo1
        .AddItem ("Administrator")
        .AddItem ("User")
End With
End Sub

Private Sub lvButtons_H1_Click()
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM Login WHERE UserName = '" & Text1.Text & "' AND Password = '" & Text2.Text & "'", cn, adOpenKeyset, adLockPessimistic
If Combo1.Text = "Administrator" Then
If rs.RecordCount > 0 Then
frmBegin.Label4.Caption = rs!Fullname
frmBegin.Show
Unload Me
Exit Sub
Else
MsgBox "Your Username or Password is incorrect", vbCritical
End If
End If
End Sub

help how can i know if the user is not an admin

i have combo box in my combo box have a user or admin additem if he choose admin then all i want is to validate if the username and password is for admin user this is my code

please post clearly using correct english and grammer.

help how can i know if the user is not an admin

i have combo box, in my combo box have a user or admin additem, if he choose admin then all i want is to validate if the username and password is for admin user, this is my code:

Private Sub Form_Load()
Call Opencn
With Combo1
        .AddItem ("Administrator")
        .AddItem ("User")
End With
End Sub

Private Sub lvButtons_H1_Click()
Set rs = New ADODB.Recordset
rs.Open "SELECT * FROM Login WHERE UserName = '" & Text1.Text & "' AND Password = '" & Text2.Text & "'", cn, adOpenKeyset, adLockPessimistic
If Combo1.Text = "Administrator" Then
If rs.RecordCount > 0 Then
frmBegin.Label4.Caption = rs!Fullname
frmBegin.Show
Unload Me
Exit Sub
Else
MsgBox "Your Username or Password is incorrect", vbCritical
End If
End If
End Sub
Comments
That doesn't answer his question at all.

how you decide if the user is an admin user or not ?

what is the logic for that ?

is there is corresponding field for that value as well ?

This article has been dead for over six months. Start a new discussion instead.