vb+access 程序修改密码
我想做一个程序可一直不能修改密码,我刚开始学的vb,所以不知道怎么改下面的代码,求各位高手帮忙改一下!!!!!!(Set rs = Execute(txtsql, msgtext)就这里出问题啦,说子程序或函数未定义!!!!!!Private Sub Command1_Click()
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim txtsql As String
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\stu.mdb"
txtsql = "Select * from 用户信息表 where username='" & Text1.Text & "'"
Set rs = Execute(txtsql, msgtext)
If rs.EOF Then
MsgBox "没有这个用户,请重新输入!", vbOKOnly
Exit Sub
End If
If Text3.Text <> Text4.Text Then
MsgBox "两次输入密码不一致!请重新输入.", vbOKOnly
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
Exit Sub
End If
If Text2.Text <> rs.Fields(1) Then
MsgBox "原密码输入不正确,请重新输入!", vbOKOnly
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.SetFocus
Else
If MsgBox("确定要更改密码吗?", vbYesNo + vbExclamation, "警告") = vbOK Then
txtsql = "update 用户信息表 set Pwd='" & Text3.Text & "' where username='" & Text1.Text & "'"
Set rs = ExecuteSQL(txtsql, msgtext)
MsgBox "更改成功!", vbOKOnly
Text2.Text = ""
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
Text1.SetFocus
txtsql.updata
Exit Sub
End If
Exit Sub
End If
End Sub