?? view_del.frm
字號:
VERSION 5.00
Begin VB.Form view_del
BorderStyle = 3 'Fixed Dialog
Caption = "庫存信息刪除"
ClientHeight = 1845
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 4830
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1845
ScaleWidth = 4830
ShowInTaskbar = 0 'False
Begin VB.ComboBox cmb_view_del
Height = 300
Left = 1200
TabIndex = 2
Top = 360
Width = 1455
End
Begin VB.CommandButton CancelButton
Caption = "取消"
Height = 375
Left = 3360
TabIndex = 1
Top = 840
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "確定"
Height = 375
Left = 3360
TabIndex = 0
Top = 240
Width = 1215
End
Begin VB.Label Label1
Caption = "刪除貨物:"
Height = 255
Left = 240
TabIndex = 3
Top = 360
Width = 1095
End
End
Attribute VB_Name = "view_del"
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 貨物名稱 from [庫存]"
Set RS = dbSelect(Sql)
While Not RS.EOF
cmb_view_del.AddItem RS.Fields(0)
RS.MoveNext
Wend
Set RS = Nothing
End Sub
Private Sub OKButton_Click()
If Trim(Me.cmb_view_del.Text) <> "" Then
Sql = "delete from [庫存] where 貨物名稱='" & Trim(Me.cmb_view_del.Text) & "'"
dbOperate Sql
Unload Me
Else
MsgBox "請選擇要刪除的貨物名稱"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -