📄 form28.frm
字号:
VERSION 5.00
Begin VB.Form Form28
BackColor = &H00FFFFC0&
BorderStyle = 4 'Fixed ToolWindow
Caption = "密码修改"
ClientHeight = 2490
ClientLeft = 45
ClientTop = 315
ClientWidth = 4740
DrawWidth = 10
LinkTopic = "Form28"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2490
ScaleWidth = 4740
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2520
TabIndex = 7
Top = 1920
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1200
TabIndex = 6
Top = 1920
Width = 1095
End
Begin VB.TextBox Text3
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 5
Top = 1200
Width = 2175
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 3
Top = 720
Width = 2175
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 1
Top = 240
Width = 2175
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "新密码"
Height = 255
Left = 720
TabIndex = 4
Top = 1320
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "原密码"
Height = 255
Left = 720
TabIndex = 2
Top = 840
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "操作员"
Height = 255
Left = 720
TabIndex = 0
Top = 360
Width = 735
End
End
Attribute VB_Name = "Form28"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'FIXIT: 使用 Option Explicit 可以避免隐式创建 Variant 类型的变量 FixIT90210ae-R383-H1984
Dim sret As String
Private Sub Command1_Click()
SearchIt
If sret = Text2.Text Then
Dim db As Database
Dim EF As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("select * from qxsz where 操作员='" & Text1.Text & "'", dbOpenDynaset)
EF.Edit
EF("密码") = Text3.Text
EF.Update
MsgBox "成功修改密码!"
EF.Close
db.Close
Else
MsgBox "对不起!您的原始密码不正确!"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub SearchIt()
Dim db As Database
Dim EF As Recordset
Set db = OpenDatabase(ConData, False, False, Constr)
Set EF = db.OpenRecordset("select * from qxsz where 操作员='" & Text1.Text & "'", dbOpenDynaset)
If EF.Fields.Count > 0 Then
sret = EF("密码")
Else
MsgBox "对不起,您的用户名错误!"
End If
EF.Close
db.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -