找出用户名以及密码是多少
我这有个代码,不知道有没有高手解答:
Private Sub Command1_Click()
Data1.Recordset.MoveFirst
Data1.Refresh
Do While Not Data1.Recordset.EOF
If Trim(Text1.Text) = Trim(Data1.Recordset( "姓名 ")) Then
If Trim(Text2.Text) = Trim(Data1.Recordset( "密码 ")) Then
MDIForm1.Show
Unload Me
Exit Sub
Else
MsgBox "密码不正确 ", 0 + 48, "警告 "
Text2.Text = " "
Text1.SetFocus
Exit Sub
End If
Else
Data1.Recordset.MoveNext
End If
Loop
MsgBox "无此用户 ", 0 + 48, "警告 "
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim dbname As String
Dim sql As String
dbname = App.Path
If Right$(dbname, 1) <> "\ " Then dbname = dbname & "\ "
dbname = dbname & "图书馆管理信息系统.mdb "
Data1.DatabaseName = dbname
sql = "select * from " & "Username "
Data1.RecordSource = sql
Data1.Refresh
Data1.Recordset.MoveFirst
Data1.Recordset.Edit
End Sub
找出用户名以及密码是多少?
[解决办法]
你打开数据库直接看看不就知道了吗
[解决办法]
哈哈哈哈
咋每次看见暴风雨的回复我就想笑呢
[解决办法]
楼上的!我也有同感!暴风雨~~~~~~~~~~~~楼主的这个问题我还有待思考~~~~~