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

📄 初始化.frm

📁 这是一个啤酒销售系统的软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm初始化 
   Caption         =   "初始化"
   ClientHeight    =   1650
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2865
   LinkTopic       =   "Form2"
   ScaleHeight     =   1650
   ScaleMode       =   0  'User
   ScaleWidth      =   2338.775
   StartUpPosition =   3  '窗口缺省
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "初始化.frx":0000
      Left            =   480
      List            =   "初始化.frx":0016
      TabIndex        =   3
      Text            =   "库存信息"
      Top             =   360
      Width           =   1935
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   375
      Left            =   1440
      TabIndex        =   2
      Top             =   840
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   480
      TabIndex        =   1
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "请选择你要初始化的数据项"
      Height          =   255
      Left            =   360
      TabIndex        =   0
      Top             =   0
      Width           =   2295
   End
End
Attribute VB_Name = "frm初始化"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
a = MsgBox("所选数据对象将会被清空,确定吗?", vbOKCancel)
  If a = 1 Then
Dim mycon As New ADODB.Connection
Dim myrs As New ADODB.Recordset
Dim mycom As New ADODB.Command
mycon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;" & "Data Source=C:\啤酒数据库\beer.mdb"
mycon.Open
If Combo1.Text = "库存信息" Then 'list(0)
strsql = " Delete from 库存 "
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
ElseIf Combo1.Text = "客户信息" Then 'lsit(1)
strsql = " Delete from 客户 "
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
ElseIf Combo1.Text = "商品信息" Then 'list(2)
strsql = " Delete from 商品 "
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
ElseIf Combo1.Text = "客户意见" Then 'list(3)
strsql = " Delete from  客户意见"
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
ElseIf Combo1.Text = "销售信息" Then 'lsit(4)
strsql = " Delete from  销售"
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
ElseIf Combo1.Text = "全部" Then 'list(5)
strsql = " Delete from 库存 "
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
strsql = " Delete from 客户 "
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
strsql = " Delete from 商品 "
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
strsql = " Delete from  客户意见"
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
strsql = " Delete from  销售"
Set mycom.ActiveConnection = mycon
mycom.CommandText = strsql
Set myrs = mycom.Execute
End If
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -