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

📄 spxxform.frm

📁 商品交易管理数据库
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form4 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "商品信息编辑窗体"
   ClientHeight    =   6615
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8340
   LinkTopic       =   "Form4"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6615
   ScaleWidth      =   8340
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command6 
      Caption         =   "返回"
      Height          =   375
      Left            =   6360
      TabIndex        =   8
      Top             =   5160
      Width           =   975
   End
   Begin VB.CommandButton Command5 
      Caption         =   "执行查询"
      Height          =   375
      Left            =   5280
      TabIndex        =   7
      Top             =   5160
      Width           =   975
   End
   Begin VB.CommandButton Command4 
      Caption         =   "取消编辑"
      Height          =   375
      Left            =   6360
      TabIndex        =   6
      Top             =   4440
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "删除"
      Height          =   375
      Left            =   5280
      TabIndex        =   5
      Top             =   4440
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "确认"
      Height          =   375
      Left            =   1440
      TabIndex        =   4
      Top             =   4440
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "增加"
      Height          =   375
      Left            =   360
      TabIndex        =   3
      Top             =   4440
      Width           =   855
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "spxxForm.frx":0000
      Left            =   2400
      List            =   "spxxForm.frx":0019
      TabIndex        =   2
      Top             =   5160
      Width           =   1335
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "spxxForm.frx":0059
      Height          =   3615
      Left            =   360
      TabIndex        =   0
      Top             =   480
      Width           =   7335
      _ExtentX        =   12938
      _ExtentY        =   6376
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      AllowAddNew     =   -1  'True
      AllowDelete     =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "商品信息数据管理"
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   2520
      Top             =   4440
      Width           =   2535
      _ExtentX        =   4471
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=E:\vb写作\商品交易管理数据库\Spjybase.mdb"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=E:\vb写作\商品交易管理数据库\Spjybase.mdb"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "spxx"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      Caption         =   "选择查询内容"
      Height          =   255
      Left            =   960
      TabIndex        =   1
      Top             =   5160
      Width           =   1215
   End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click() '增加
Adodc1.Recordset.AddNew

End Sub

Private Sub Command2_Click() '确认

Adodc1.Recordset.Update

End Sub

Private Sub Command3_Click() '删除
If MsgBox("确实要删除记录吗", vbYesNo, "提示信息") = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext

End Sub

Private Sub Command4_Click() '取消编辑

Adodc1.Recordset.CancelUpdate

End Sub

Private Sub Command5_Click() '执行查询

Dim msg
oldmark = Adodc1.Recordset.Bookmark
msg = Trim(InputBox("请输入" + Combo1.Text, "商品查询 "))
If Combo1.Text = "商品编号" Then
  msg = "selext * from spxx where 商品编号 like '" & msg & "'"
End If
If Combo1.Text = "商品名称" Then
  msg = "selext * from spxx where 商品名称 like '" & msg & "'"
End If
If Combo1.Text = "种类" Then
  msg = "selext * from spxx where 种类 like '" & msg & "'"
End If
If Combo1.Text = "进价" Then
  msg = "selext * from spxx where 进价 like '" & msg & "'"
End If
If Combo1.Text = "售价" Then
  msg = "selext * from spxx where 售价 like '" & msg & "'"
End If
If Combo1.Text = "进货日期" Then
  msg = "selext * from spxx where 进货日期 like '" & msg & "'"
End If
If Combo1.Text = "商品供应商" Then
  msg = "selext * from spxx where 商品供应商 like '" & msg & "'"
End If
DataGrid1.RecordSelectors = True
Adodc1.RecordSource = msg

End Sub

Private Sub Command6_Click() '返回

Unload Me

End Sub
Private Sub Adodc1_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)

'这就是放置错误处理代码的地方
'如果想忽略错误,注释掉下一行代码
'如果想捕捉错误'在这里添加错误处理代码
MsgBox "数据错误事件命中错误:" & Error$(DataErr)
Response = 0 '忽略错误
End Sub         'adodc错误过程触发代码

Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'记录状态显示代码
Adodc1.Caption = "记录:" & (Adodc1.Recordset.AbsolutePosition + 1)

End Sub

Private Sub Form_Load()

End Sub

⌨️ 快捷键说明

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