【VB开源代码栏目提醒】:网学会员VB开源代码为您提供frmchangepwd.frm参考,解决您在frmchangepwd.frm学习中工作中的难题,参考学习。
VERSION 5.00
Begin VB.Form frmchangepwd
BackColor = &H00C0FFFF&
Caption = "Form1"
ClientHeight = 2490
ClientLeft = 60
ClientTop = 450
ClientWidth = 4335
LinkTopic = "Form1"
ScaleHeight = 2490
ScaleWidth = 4335
StartUpPosition = 3 'Windows Default
Begin VB.TextBox txtnew
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 3
Top = 360
Width = 1575
End
Begin VB.TextBox txtnewqr
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
Pass
wordChar = "*"
TabIndex = 2
Top = 1080
Width = 1575
End
Begin VB.CommandButton cmdok
Caption = "确定"
Height = 375
Left = 840
TabIndex = 1
Top = 1800
Width = 975
End
Begin VB.CommandButton cmdcancel
Caption = "取消"
Height = 375
Left = 2520
TabIndex = 0
Top = 1800
Width = 975
End
Begin
VB.Label Label1
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "输入新密码"
Height = 195
Left = 600
TabIndex = 5
Top = 480
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "确认新密码"
Height = 195
Left = 600
TabIndex = 4
Top = 1200
Width = 900
End
End
Attribute VB_Name = "frmchangepwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdok_Click()
Dim rs_chang As New ADODB.Recordset
Dim sql As String
If Trim(txtnew.Text) <> Trim(txtnewqr.Text) Then
MsgBox "密码不一致!", vbOKOnly + vbExclamation, ""
txtnew.SetFocus
txtnew.Text = ""
txtnewqr.Text = ""
Else
sql = "select * from
系统管理 where 用户名='" & userID & "'"
rs_chang.Open sql, conn, adOpenKeyset, adLockPessi
mistic
rs_chang.Fields(1) = txtnew.Text
rs_chang.Update
rs_chang.Close
MsgBox "密码修改成功", vbOKOnly + vbExclamation, ""
Unload Me
End If
End Sub
Private Sub cmdcancel_Click()
Unload Me
End Sub