📄 altermimaform.frm
字号:
VERSION 5.00
Begin VB.Form alterMiMaForm
BorderStyle = 1 'Fixed Single
Caption = "修改密码"
ClientHeight = 3675
ClientLeft = 45
ClientTop = 435
ClientWidth = 6495
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3675
ScaleWidth = 6495
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox queRenText4
Height = 375
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 9
Top = 1800
Width = 3015
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 4080
TabIndex = 7
Top = 2520
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 840
TabIndex = 6
Top = 2520
Width = 1695
End
Begin VB.TextBox xinMiMaText3
Height = 375
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 2
Top = 1320
Width = 3015
End
Begin VB.TextBox yuanMiMaText2
Height = 375
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 1
Top = 840
Width = 3015
End
Begin VB.TextBox userNametext1
Height = 375
Left = 2280
TabIndex = 0
Top = 360
Width = 3015
End
Begin VB.Label Label4
Caption = "确认"
Height = 255
Left = 840
TabIndex = 8
Top = 1920
Width = 615
End
Begin VB.Label Label3
Caption = "新密码"
Height = 255
Left = 840
TabIndex = 5
Top = 1440
Width = 615
End
Begin VB.Label Label2
Caption = "原密码"
Height = 255
Left = 840
TabIndex = 4
Top = 960
Width = 615
End
Begin VB.Label Label1
Caption = "用户名"
Height = 255
Left = 840
TabIndex = 3
Top = 360
Width = 735
End
End
Attribute VB_Name = "alterMiMaForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim tempPoint As ADODB.Recordset
Dim findSQL As String
Dim xiuGai As Boolean
xiuGai = False
If Trim(userNametext1.Text = "") Then
MsgBox "请输入用户!", vbOKOnly + vbExclamation, "错误"
userNametext1.SetFocus
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
Else
If Trim(yuanMiMaText2.Text = "") Then
MsgBox "请输入原密码!", vbOKOnly + vbExclamation, "错误"
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
yuanMiMaText2.SetFocus
Else
If Trim(xinMiMaText3.Text = "") Then
MsgBox "请输入新密码!", vbOKOnly + vbExclamation, "错误"
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
yuanMiMaText2.SetFocus
Else
If Trim(queRenText4.Text = "") Then
MsgBox "请确认新密码!", vbOKOnly + vbExclamation, "错误"
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
yuanMiMaText2.SetFocus
Else
If (Trim(xinMiMaText3.Text) <> Trim(queRenText4.Text)) Then
MsgBox "请确认新密码!", vbOKOnly + vbExclamation, "错误"
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
yuanMiMaText2.SetFocus
Else
xiuGai = True
End If
End If
End If
End If
End If
If xiuGai = True Then
findSQL = "select * from 职工表 where 职工号 ='" & userNametext1.Text & "'"
Set tempPoint = ExecuteSQL(findSQL)
If tempPoint.EOF = True Then
MsgBox "没有这个用户,请重新输入!", vbOKOnly + vbExclamation, "错误"
userNametext1.SetFocus
userNametext1.Text = ""
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
Else
If tempPoint.Fields(2) <> yuanMiMaText2.Text Then
MsgBox "密码错误,请重新输入!", vbOKOnly + vbExclamation, "错误"
userNametext1.SetFocus
userNametext1.Text = ""
yuanMiMaText2.Text = ""
xinMiMaText3.Text = ""
queRenText4.Text = ""
Else
tempPoint.Fields(2) = Trim(xinMiMaText3.Text)
tempPoint.Update
tempPoint.Close
MsgBox "修改成功!请重新登陆", vbOKOnly + vbExclamation, ""
Unload Me
Unload MDIForm1
logIn.Show
End If
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim xiuGai As Boolean
xiuGai = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -