?? 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 + -