📄 frmmodify.frm
字号:
VERSION 5.00
Begin VB.Form frmmodify
Caption = "修改密码"
ClientHeight = 2910
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2910
ScaleWidth = 4680
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton cmdexit
Caption = "退出"
Height = 465
Left = 2610
TabIndex = 5
Top = 1920
Width = 1095
End
Begin VB.CommandButton cmdmodify
Caption = "修改"
Height = 525
Left = 1050
TabIndex = 4
Top = 1920
Width = 1065
End
Begin VB.TextBox txtpassword2
Height = 465
Left = 2100
TabIndex = 3
Top = 1050
Width = 1605
End
Begin VB.TextBox txtpassword1
Height = 495
Left = 2100
TabIndex = 2
Top = 420
Width = 1605
End
Begin VB.Label Label2
Caption = "确认新密码:"
Height = 525
Left = 1020
TabIndex = 1
Top = 1110
Width = 1575
End
Begin VB.Label Label1
Caption = "输入新密码:"
Height = 465
Left = 1050
TabIndex = 0
Top = 480
Width = 1515
End
End
Attribute VB_Name = "frmmodify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdmodify_Click()
Dim txtsql, msgtext As String
Dim mrc As ADODB.Recordset
'判断密码输入是否一致
If Trim(txtpassword1.Text) <> Trim(txtpassword2.Text) Then
MsgBox "密码输入不一致!", vbOKOnly, "警告"
Else '对当前用户的密码进行修改
txtsql = "select * from user_info where user_ID='" & username_OK & "'"
Set mrc = ExecuteSQL(txtsql, msgtext)
mrc.Fields("user_PWD") = Trim(txtpassword1.Text)
mrc.Update
mrc.Close
MsgBox "密码修改成功", vbOKOnly, "修改密码"
End If
End Sub
Private Sub cmdexit_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -