设计修改密码模块但无法成功请帮忙看看
当我运行下面代码时。系统返回提示"wrong",正确成功修改密码后应该是提示“已成功修改了用户密码”,但就是怎样都无法成功修改密码,请问是哪里出错。谢谢,还请问下下面的user需要定义的吗,但我看资料里面没有,是要加载什么插件的?Private Sub Command1_Click()
If IsNull(New_pwd1) Then
MsgBox "请输入新密码", vbCritical, "提示"
End If
If IsNull(New_pwd2) Then
MsgBox "请再次输入新密码", vbCritical, "提示"
End If
If New_pwd1 <> New_pwd2 Then
MsgBox "两次输入不一致", vbCritical, "错误"
New_pwd1.SetFocus
New_pwd1 = ""
New_pwd2 = ""
End If
Dim rs As New ADODB.Recordset
Dim str As String
str = "select * from 登陆 where 登陆人='" & user & "'"
Set rs = GetRs(str)
If Not rs.EOF Then
rs("登陆人") = user
rs("密码") = New_pwd1
rs.Update
rs.close
Set rs = Nothing
MsgBox "您成功修改了该用户密码!"
Else
MsgBox "wrong"
End If
Me.Visible = False
End Sub 重复问题,看回复
http://topic.csdn.net/u/20111228/22/011169a9-b13e-42ef-a558-ac2916acbfd8.html?seed=776690296&r=77110683#r_77110683
补充:VB , VBA