📄 frm_editpassowrd.frm
字号:
VERSION 5.00
Begin VB.Form Frm_EditPassword
Caption = "修改密码"
ClientHeight = 3960
ClientLeft = 60
ClientTop = 345
ClientWidth = 4995
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3960
ScaleWidth = 4995
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 3885
Left = 60
TabIndex = 0
Top = 0
Width = 4845
Begin VB.CommandButton Command1
Caption = ".."
Height = 315
Left = 3840
TabIndex = 13
Top = 390
Width = 315
End
Begin VB.CommandButton Btn_Exit
Caption = "返 回"
Height = 345
Left = 2790
TabIndex = 12
Top = 3090
Width = 1215
End
Begin VB.CommandButton Btn_Ok
Caption = "确 定"
Height = 345
Left = 540
TabIndex = 11
Top = 3090
Width = 1215
End
Begin VB.TextBox Text5
Height = 315
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 10
Top = 2340
Width = 1965
End
Begin VB.TextBox Text4
Height = 315
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 8
Top = 1830
Width = 1965
End
Begin VB.TextBox Text3
Height = 315
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 6
Top = 1350
Width = 1965
End
Begin VB.TextBox Text2
Height = 315
Left = 1800
TabIndex = 4
Top = 870
Width = 1965
End
Begin VB.TextBox Text1
Height = 315
Left = 1800
TabIndex = 2
Top = 390
Width = 1965
End
Begin VB.Label Label1
Caption = "确认新密码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 4
Left = 570
TabIndex = 9
Top = 2400
Width = 1155
End
Begin VB.Label Label1
Caption = "输入新密码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 3
Left = 570
TabIndex = 7
Top = 1890
Width = 1155
End
Begin VB.Label Label1
Caption = "输入旧密码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 2
Left = 570
TabIndex = 5
Top = 1410
Width = 1155
End
Begin VB.Label Label1
Caption = "用户名称"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 1
Left = 780
TabIndex = 3
Top = 930
Width = 975
End
Begin VB.Label Label1
Caption = "用户代码"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Index = 0
Left = 780
TabIndex = 1
Top = 450
Width = 975
End
End
End
Attribute VB_Name = "Frm_EditPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Btn_Exit_Click()
Unload Me
End Sub
Private Sub Btn_Ok_Click()
Dim m_Rs As New ADODB.Recordset
Dim strSql As String
'''''检测输入的正确性''''''''''
If Text1.Text = "" Then
MsgBox "请输入用户代码..."
Exit Sub
End If
If Text4.Text <> Text5.Text Then
MsgBox "输入的新密码不一致,..."
Exit Sub
End If
'''''检测输入的旧密码是否正确'''''''''''''
strSql = "SELECT * FROM UserInfo WHERE UserID='" & Trim(Text1.Text) & "' and UserPwd='" & Trim(Text3.Text) & "'"
If Not isRecordExist(strSql, "person.mdb") Then
MsgBox "输入的旧密码不存在,请重新输入..."
Exit Sub
End If
''''''''''''''''''''''''''''''''''''''''''
If MsgBox("确认是否修改密码?", vbYesNo + vbQuestion, "提示?") = vbYes Then
strSql = "UPDATE UserInfo Set UserPwd='" & Trim(Text4.Text) & "' WHERE UserID='" & Trim(Text1.Text) & "'"
Set m_Rs = ExecuteSQL(strSql, "person.mdb")
MsgBox "密码修改成功..."
End If
End Sub
Private Sub Command1_Click()
Frm_UserCode.Show 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -