一个登陆界面问题,求解
程序代码:
Private Sub Command12_Click() 'On Error GoTo Err_Command12_Click Dim str As String Dim logname As String Dim pwd As String 'Dim rs As New ADODB.Recordset logname = Trim(Me.Text2) pwd = Trim(Me.Text4) If IsNull(logname) Then DoCmd.Beep MsgBox ("请输入用户名!") ElseIf IsNull(pwd) Then DoCmd.Beep MsgBox ("请输入密码!") Else str = "select * from 管理员表 where UserName='" & logname & "'and PassWord='" & pwd & "'" 'Set rs = If (str <> Me.Text2) Then 'rs.EOF Then DoCmd.Beep MsgBox ("没有这个用户,请重新输入!") Me.Text2 = "" Me.Text4 = "" Me.Text2.SetFocus Exit Sub Else DoCmd.Close MsgBox ("欢迎使用人事管理系统!") DoCmd.OpenForm ("人事管理系统") End If check = True End If 'End End Sub输入了正确的信息,但是打不开窗体