📄 form13.frm
字号:
VERSION 5.00
Begin VB.Form Form13
BorderStyle = 0 'None
Caption = "修改自己密码"
ClientHeight = 5280
ClientLeft = 0
ClientTop = 0
ClientWidth = 7710
LinkTopic = "Form13"
ScaleHeight = 5280
ScaleWidth = 7710
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command1
Caption = "确认修改"
Height = 495
Left = 2880
TabIndex = 4
Top = 2760
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
Left = 2760
TabIndex = 3
Text = "Text2"
Top = 1680
Width = 2655
End
Begin VB.TextBox Text1
Height = 495
Left = 2760
TabIndex = 1
Text = "Text1"
Top = 720
Width = 2655
End
Begin VB.Label Label3
Caption = "1——10位"
Height = 375
Left = 5880
TabIndex = 5
Top = 720
Width = 975
End
Begin VB.Label Label2
Caption = "Label2"
Height = 255
Left = 1440
TabIndex = 2
Top = 1800
Width = 975
End
Begin VB.Label Label1
Caption = "Label1"
Height = 255
Left = 1440
TabIndex = 0
Top = 840
Width = 975
End
End
Attribute VB_Name = "Form13"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Len(Text1.Text) > 10 Or Len(Text2.Text) < 0 Then
MsgBox "密码长度超过了最大长度或没有输入密码"
ElseIf Text2.Text <> Text1.Text Then
MsgBox "两次输入密码不一样"
Else
cmd.CommandText = "update xinxi0504_23_employee set employee_secret_code='" & Trim(Text1.Text) & "' where employee_id='" & employee_id & "'"
cmd.Execute
MsgBox "密码修改成功"
End If
End Sub
Private Sub Form_Load()
Label1.Caption = "输入新密码"
Label2.Caption = "确认输入"
Text1.Text = ""
Text2.Text = ""
Text1.PasswordChar = "*"
Text2.PasswordChar = "*"
Set rs = New ADODB.Recordset
cmd.CommandType = adCmdText
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -