private sub cmdok_click()
dim txtsql as string
dim msgtext as string
dim mrc as adodb.recordset
if trim(text1(0).text)<>trim(text1(1).text) then
msgbox"密码输入不一致,请重新输入",vbokonly+vbexclamation,"提示"
text1(0).setfocus
exit sub
else
if trim(text1(0).text)="" then
msgbox"密码不能为空",vbokonly+vbexclamation,"警告"
text1(0).setfocus
exit sub
else
txtsql="select * from user_info where user_id='"&username&"'"
set mrc=executesql(txtsql,msgtext)
mrc.fields(1)=trim(txtpassword.text)
mrc.update
msgbox"修改成功",vbokonly+vbexclamation,"警告"
mrc.close
me.hide
end if
end if
end sub