?? f密碼維護(hù).frm
字號:
VERSION 5.00
Begin VB.Form F密碼維護(hù)
Caption = "密碼維護(hù)"
ClientHeight = 2880
ClientLeft = 60
ClientTop = 450
ClientWidth = 4305
LinkTopic = "Form1"
ScaleHeight = 2880
ScaleWidth = 4305
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Caption = "密碼維護(hù)"
Height = 2775
Left = 0
TabIndex = 0
Top = 0
Width = 4215
Begin VB.TextBox txtCheck
Appearance = 0 'Flat
Height = 345
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 5
Top = 1320
Width = 1845
End
Begin VB.TextBox txtNew
Appearance = 0 'Flat
Height = 345
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 4
Top = 840
Width = 1845
End
Begin VB.TextBox txtOld
Appearance = 0 'Flat
Height = 345
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 3
Top = 360
Width = 1845
End
Begin VB.CommandButton CmdCancel
Caption = "退出"
Height = 375
Left = 2160
TabIndex = 2
Top = 2160
Width = 975
End
Begin VB.CommandButton CmdOk
Caption = "確定"
Height = 375
Left = 1080
TabIndex = 1
Top = 2160
Width = 855
End
Begin VB.Label Label8
Caption = "(小于10位)"
ForeColor = &H000000FF&
Height = 255
Index = 1
Left = 3240
TabIndex = 9
Top = 960
Width = 855
End
Begin VB.Label Label2
Caption = "確認(rèn)密碼:"
Height = 255
Left = 360
TabIndex = 8
Top = 1440
Width = 975
End
Begin VB.Label Label1
Caption = "新密碼(N)"
Height = 255
Left = 360
TabIndex = 7
Top = 960
Width = 855
End
Begin VB.Label lblLabels
Caption = "舊密碼(&P):"
Height = 270
Index = 1
Left = 360
TabIndex = 6
Top = 480
Width = 1080
End
End
End
Attribute VB_Name = "F密碼維護(hù)"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim SQL As String
Dim msg As String
Private Sub CmdOK_Click()
'確定操作
Dim rst As ADODB.Recordset
Dim pOld As String '保存用戶的密碼
Dim pNew As String '保存用戶的新密碼
Dim pCheck As String '保存用戶的確認(rèn)密碼
'賦值
pOld = Trim(txtOld.Text)
pNew = Trim(txtNew.Text)
pCheck = Trim(txtCheck.Text)
SQL = "select 用戶ID,用戶名稱,密碼 from 用戶信息表 where 用戶ID='" & UserID & "'"
SQL = SQL & " and 密碼='" & pOld & "'"
On Error GoTo ErrMsg '出錯(cuò)處理
Set rst = SelectSQL(SQL, msg)
If rst.RecordCount > 0 Then '如果輸入密碼正確
'檢查新密碼和確認(rèn)密碼
If (pCheck <> pNew) Then
MsgBox ("兩次輸入的密碼不一致!")
Exit Sub
End If
'接受新的密碼
rst.Fields("密碼") = pNew
rst.Update
MsgBox ("更新成功!")
Else
MsgBox ("用戶ID或密碼輸入錯(cuò)誤!")
Exit Sub
End If
Exit Sub
ErrMsg: '出錯(cuò)信息
MsgBox Err.Description, vbExclamation, "出錯(cuò)"
End Sub
Private Sub cmdCancel_Click()
'退出操作
進(jìn)銷存管理系統(tǒng).Enabled = True
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
'退出操作
進(jìn)銷存管理系統(tǒng).Enabled = True
Unload Me
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -