📄 user_upd.frm
字号:
VERSION 5.00
Begin VB.Form user_upd
BorderStyle = 3 'Fixed Dialog
Caption = "修改用户密码"
ClientHeight = 2280
ClientLeft = 4605
ClientTop = 4365
ClientWidth = 4350
Icon = "user_upd.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2280
ScaleWidth = 4350
ShowInTaskbar = 0 'False
Begin VB.TextBox txt_user_passwd2
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 1320
Width = 1335
End
Begin VB.TextBox txt_user_passwd
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 3
Top = 720
Width = 1335
End
Begin VB.ComboBox cmb_user_name
Height = 300
Left = 1200
TabIndex = 2
Top = 240
Width = 1335
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 2880
TabIndex = 1
Top = 960
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "确定"
Height = 375
Left = 2880
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Label Label3
Caption = "重复密码:"
Height = 375
Left = 240
TabIndex = 7
Top = 1320
Width = 1215
End
Begin VB.Label Label2
Caption = "新密码:"
Height = 375
Left = 240
TabIndex = 6
Top = 720
Width = 1215
End
Begin VB.Label Label1
Caption = "用户名:"
Height = 375
Left = 240
TabIndex = 5
Top = 240
Width = 1215
End
End
Attribute VB_Name = "user_upd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sql As String
Dim RS As ADODB.Recordset
Private Sub CancelButton_Click()
Unload Me
End Sub
Private Sub Form_Load()
Sql = "select u_name from [user]"
Set RS = dbSelect(Sql)
While Not RS.EOF
cmb_user_name.AddItem RS.Fields(0)
RS.MoveNext
Wend
Set RS = Nothing
End Sub
Private Sub OKButton_Click()
'修改用户密码
If Me.cmb_user_name <> "" And Me.txt_user_passwd <> "" And Me.txt_user_passwd2 <> "" Then
If Me.txt_user_passwd = Me.txt_user_passwd2 Then
Sql = "update [user] set u_passwd='" & txt_user_passwd.Text & "' where u_name='" & cmb_user_name.Text & "'"
dbOperate Sql
Unload Me
Else
MsgBox "密码确认不成功,请重新输入密码!"
txt_user_passwd = ""
txt_user_passwd2 = ""
End If
Else
MsgBox "请将信息填写完整!"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -