📄 frm
字号:
VERSION 5.00
Begin VB.Form frm用户口令维护
BorderStyle = 3 'Fixed Dialog
Caption = "修改口令"
ClientHeight = 2595
ClientLeft = 45
ClientTop = 240
ClientWidth = 4380
Icon = "frm用户口令维护.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2595
ScaleWidth = 4380
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtNewPWD2
Height = 330
IMEMode = 3 'DISABLE
Left = 1935
MaxLength = 10
PasswordChar = "*"
TabIndex = 10
Top = 1590
Width = 1365
End
Begin VB.TextBox txtOldPWD
Height = 330
IMEMode = 3 'DISABLE
Left = 1935
MaxLength = 10
PasswordChar = "*"
TabIndex = 5
Top = 825
Width = 1365
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消[&C]"
Height = 390
Left = 2325
TabIndex = 4
Top = 2055
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "确定[&O]"
Default = -1 'True
Height = 390
Left = 915
TabIndex = 3
Top = 2070
Width = 1140
End
Begin VB.TextBox txtUserName
Height = 330
Left = 1935
Locked = -1 'True
TabIndex = 2
Top = 435
Width = 975
End
Begin VB.TextBox txtNewPWD
Height = 330
IMEMode = 3 'DISABLE
Left = 1935
MaxLength = 10
PasswordChar = "*"
TabIndex = 1
Top = 1200
Width = 1365
End
Begin VB.TextBox txtUserCode
Height = 330
Left = 1935
Locked = -1 'True
MaxLength = 5
TabIndex = 0
Top = 60
Width = 975
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "新密码"
Height = 180
Index = 4
Left = 1140
TabIndex = 11
Top = 1290
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "原密码"
Height = 180
Index = 1
Left = 1125
TabIndex = 9
Top = 900
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户姓名"
Height = 180
Index = 0
Left = 975
TabIndex = 8
Top = 525
Width = 720
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "验证新密码"
Height = 180
Index = 2
Left = 810
TabIndex = 7
Top = 1680
Width = 900
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户代号"
Height = 180
Index = 3
Left = 975
TabIndex = 6
Top = 135
Width = 720
End
End
Attribute VB_Name = "frm用户口令维护"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
'on error goto
Dim sSQL As String
If txtNewPWD.Text <> txtNewPWD2.Text Then
MsgBox "口令错误,请检查。", vbExclamation, "错误"
Exit Sub
End If
sSQL = " select * from 人员档案 where STAFFCODE= '" & UserCode & _
"' and name='" & UserName & "' "
Set RsTemp = Nothing
Set RsTemp = OpenRS(sSQL)
If txtOldPWD.Text <> Trim(RsTemp("password")) Then
MsgBox "口令错误,请检查。", vbExclamation, "错误"
Exit Sub
Else
sSQL = "update 人员档案 set password='" & txtNewPWD.Text & _
"' where STAFFCODE='" & UserCode & "' and password='" & txtOldPWD.Text & "' "
If RunSQL(sSQL) = 0 Then MsgBox "修改成功!", vbInformation, "提示"
End If
Unload Me
End Sub
Private Sub Form_Load()
txtUserCode.Text = UserCode
txtUserName.Text = UserName
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -