Dim strsql As String
Dim strusername As String
Dim strpwd As String
strusername = Trim(Text1.Text)
strpwd = Trim(Text2.Text)
strsql = "select * from yonghu where 用户='" & strusername & "'"
If Text1.Text <> strsql Then
MsgBox "用户名错误"
Exit Sub
End If
strsql = "select * from yonghu where 密码='" & strpwd & "'"
If Text2.Text <> strsql Then
MsgBox "密码错误,请重新输入!"
Exit Sub
Else
Cmmand1.Enabled = True
Cmmand2.Enabled = True
Cmmand3.Enabled = True
Command4.Enabled = False