Public Function login() As Boolean
Dim rst As New ADODB.Recordset
Dim strSQL As String
strSQL = "SELECT 员工Id, 密码 FROM 员工表 WHERE 员工Id = " & Me.cboUserName
rst.Open strSQL, CurrentProject.Connection, adOpenStatic
If rst.RecordCount > 0 Then
If rst("密码") = Me.TxtPwd Then login = True
End If
End Function