📄 frmupdateuser.frm
字号:
VERSION 5.00
Begin VB.Form frmUpdateUser
BackColor = &H80000007&
Caption = "Form1"
ClientHeight = 4275
ClientLeft = 60
ClientTop = 345
ClientWidth = 7350
LinkTopic = "Form1"
ScaleHeight = 4275
ScaleWidth = 7350
StartUpPosition = 3 '窗口缺省
Begin VB.ListBox lst
Height = 3840
Left = 240
TabIndex = 4
Top = 120
Width = 1935
End
Begin VB.TextBox txt
Height = 270
Left = 3000
Locked = -1 'True
TabIndex = 3
Top = 2160
Width = 3615
End
Begin VB.ComboBox cmb
Height = 300
Left = 3000
TabIndex = 2
Top = 2760
Width = 3615
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "关 闭"
Height = 345
Left = 5280
TabIndex = 1
Top = 3600
Width = 975
End
Begin VB.CommandButton cmdUpdate
Caption = "修 改"
Default = -1 'True
Height = 345
Left = 4080
TabIndex = 0
Top = 3600
Width = 975
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 1
Left = 2400
TabIndex = 6
Top = 2280
Width = 540
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "权限:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 0
Left = 2400
TabIndex = 5
Top = 3000
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 Form_Load()
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 + -