Private Sub Command1_Click()
Dim rs_chang As New ADODB.Recordset
Dim sql As String
If Trim(Text1.Text) <> Trim(Text2.Text) Then
MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Else
x = Trim(Text1.Text)
sql = "select * from 系统管理 where 用户名='" & userID & "'"
rs_chang.Open sql, conn, adOpenKeyset, adLockOptimistic
rs_chang.Fields(1) = x
rs_chang.Update
rs_chang.Close
MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "'"
Unload Me
End If
End Sub
把上面的代码复制过去就可以了