请教各位,这个用户名密码为什么只能读取一个?

vb设置登录界面,为什么只能验证设置区域的第一行密码呢?各位谁有相关的实例吗?

img


Option Explicit
Const MaxLoginTimes As Integer = 3
Private Sub cmdLogin_Click()
    Static loginTimes As Integer
    loginTimes = loginTimes + 1
If loginTimes < MaxLoginTimes Then
    On Error GoTo ppp
    Dim Cn As Connection
    Dim Rs As Recordset
    Dim strSQL As String
    
    Set Cn = New Connection
    Set Rs = New Recordset
    Cn.ConnectionString = " provider=Microsoft.Jet.OLEDB.3.51;Data Source=C:\Users\jf\Desktop\TestExample.mdb"
    Cn.Open
    Rs.ActiveConnection = Cn
    strSQL = "select UserPassword from UserInformation where UserID= '" & Me.txtUserID.Text & "'"
    Rs.Open (strSQL)
    If Rs.EOF = True Then
        MsgBox txtUserID.Text & "不存在"
        Me.txtUserID.SetFocus
        Me.txtUserID.SelStart = 0
        Me.txtUserID.SelLength = Len(Me.txtUserID.Text)
    Else
       If Rs.Fields("UserPassword").Value = Me.txtPassword.Text Then
            MsgBox "登录成功"
            Unload Me
            'frmNew.show
       Else
        MsgBox "密码错误"
       End If
     End If
        
ppp:
    Cn.Close
Else
    MsgBox "亲,您的输入次数超过允许的最大次数", vbCritical, "登录"
End If
End Sub