📄 frmupdateuser.frm
字号:
VERSION 5.00
Begin VB.Form frmUpdateUser
BackColor = &H80000000&
Caption = "Form1"
ClientHeight = 2940
ClientLeft = 60
ClientTop = 345
ClientWidth = 5835
LinkTopic = "Form1"
ScaleHeight = 2940
ScaleWidth = 5835
StartUpPosition = 3 '窗口缺省
Begin VB.ListBox lst
Height = 2580
Left = 240
TabIndex = 4
Top = 120
Width = 1935
End
Begin VB.TextBox txt
Height = 270
Left = 3600
Locked = -1 'True
TabIndex = 3
Top = 360
Width = 1935
End
Begin VB.ComboBox cmb
Height = 300
Left = 3600
TabIndex = 2
Top = 1080
Width = 1935
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关 闭"
Height = 345
Left = 4080
TabIndex = 1
Top = 1920
Width = 975
End
Begin VB.CommandButton cmdUpdate
Caption = "修 改"
Default = -1 'True
Height = 345
Left = 2760
TabIndex = 0
Top = 1920
Width = 975
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00FF0000&
Height = 180
Index = 1
Left = 2520
TabIndex = 6
Top = 360
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "权限:"
ForeColor = &H00FF0000&
Height = 180
Index = 0
Left = 2520
TabIndex = 5
Top = 1080
Width = 540
End
End
Attribute VB_Name = "frmUpdateUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
Dim userName As String
'响应 "关闭" 铵钮
Private Sub cmdClose_Click()
Unload Me
End Sub
'响应 "修改" 按钮
Private Sub cmdUpdate_Click()
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
con.Execute "update users set power='" & cmb.Text & "' where name='" & userName & "'"
MsgBox "修改成功!"
Unload Me
End Sub
'响就列表
Private Sub lst_Click()
Set rst = New Recordset
userName = lst.Text
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
rst.Open "select * from users where name='" & lst.Text & "'", con, adOpenDynamic, adLockOptimistic
txt.Text = rst!Name
cmb.Text = rst!power
rst.Close
con.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -