⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view_del.frm

📁 仓库管理系统,使用access数据库
💻 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 + -