这个程序怎么运行呀
End SubPrivate Sub Command2_Click()
x = Text1.Text
y = Text2.Text
Dim mrc As ADODB.Recordset
txtsql = "select username from userinfo where username='" & Trim(Text1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 用户名错误!", vbExclamation + vbOKOnly, "警告"
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Exit Sub
End If
UserName = mrc.Fields(0)
txtsql = "select username from userinfo where password='" & Trim(Text2.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 密码错误!", vbExclamation + vbOKOnly, "警告"
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
Exit Sub
End If
MDIForm1.Show
Unload Me
End If
End Sub
Private Sub Form_Load()
Dim x, y
End Sub
Private Sub Text1_Change()
'调用一个数据库给用户验证
End Sub
Private Sub Text2_Change()
'调用一个数据库中的密码验证
End Sub