张静 发表于:2009-05-04 21:42:24
Private Sub cmdyes_Click()
Dim Temp As String
If IsNull(Mel(User_Name)) Or IsNull(Mel(User_password)) Then
MsgBox "您输入的用户名和密码不能为空,请重新输入!", VbOKONnly, "警告信息"
Else
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
Temp = "Select*from 用户 Where 注册名称=""&Mel[User_Name]&""And 注册密码="""
&Mel[User_Password]&"."
Rs Open Temp.Currenproject.Connection,adOpenKeyset,adLockOptimstic
If Rs.RecordCount > 0 Then
DoCmd.OpenForm "切换面板", acNormal, "", "", acReadOnly, acWindowNormal
Else
MsgBox "您输入的用户名和密码有误,请重新输入!", vbOKOnly, "警告信息"
End If
Rs.Close
Set Rs = Nonthing
End If
End Sub
Private Sub cmdyes_Click()
Dim Temp As String
If IsNull(Me.User_Name) Or IsNull(Me.User_password) Then
MsgBox "您输入的用户名和密码不能为空,请重新输入!", VbOKONnly, "警告信息"
Else
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
Temp = "Select * from 用户 Where 注册名称='" & Me.User_Name & "' And 注册密码='"
& Me.User_Password & "'"
Rs.Open Temp,Currenproject.Connection,adOpenKeyset,adLockOptimstic
If Rs.RecordCount > 0 Then
DoCmd.OpenForm "切换面板", acNormal, "", "", acReadOnly, acWindowNormal
Else
MsgBox "您输入的用户名和密码有误,请重新输入!", vbOKOnly, "警告信息"
End If
Rs.Close
Set Rs = Nonthing
End If
End Sub
总记录:1篇 页次:1/1 9 1 :