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

📄 main_cxtj_xscx.frm

📁 简单的进销存vb源代码
💻 FRM
字号:
VERSION 5.00
Object = "{00028C01-0000-0000-0000-000000000046}#1.0#0"; "DBGRID32.OCX"
Begin VB.Form main_cxtj_xscx 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "查询统计——【销售查询】"
   ClientHeight    =   4500
   ClientLeft      =   345
   ClientTop       =   2400
   ClientWidth     =   10380
   Icon            =   "main_cxtj_xscx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4500
   ScaleWidth      =   10380
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame1 
      Caption         =   "请选择查询条件"
      Height          =   630
      Left            =   60
      TabIndex        =   7
      Top             =   75
      Width           =   6375
      Begin VB.TextBox Text1 
         BackColor       =   &H80000000&
         Height          =   300
         Left            =   2130
         TabIndex        =   9
         Top             =   210
         Width           =   4125
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "main_cxtj_xscx.frx":000C
         Left            =   120
         List            =   "main_cxtj_xscx.frx":000E
         Style           =   2  'Dropdown List
         TabIndex        =   8
         Top             =   210
         Width           =   1965
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Frame2"
      Height          =   1650
      Left            =   -465
      TabIndex        =   3
      Top             =   2130
      Visible         =   0   'False
      Width           =   1320
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   "D:\VB数据库开发实例解析\程序\医药进销存管理系统\yyjxc.mdb"
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   345
         Left            =   90
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   "xsd"
         Top             =   180
         Width           =   1140
      End
      Begin VB.TextBox rq1 
         Height          =   270
         Left            =   90
         TabIndex        =   5
         Top             =   855
         Width           =   1035
      End
      Begin VB.TextBox rq2 
         Height          =   270
         Left            =   90
         TabIndex        =   4
         Top             =   1140
         Width           =   1035
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询"
      Height          =   435
      Left            =   6555
      TabIndex        =   2
      Top             =   180
      Width           =   1245
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   435
      Left            =   9075
      TabIndex        =   1
      Top             =   180
      Width           =   1245
   End
   Begin VB.CommandButton Command2 
      Caption         =   "删除"
      Height          =   435
      Left            =   7815
      TabIndex        =   0
      Top             =   180
      Width           =   1245
   End
   Begin MSDBGrid.DBGrid DBGrid1 
      Bindings        =   "main_cxtj_xscx.frx":0010
      Height          =   3615
      Left            =   45
      OleObjectBlob   =   "main_cxtj_xscx.frx":0024
      TabIndex        =   6
      Top             =   750
      Width           =   10290
   End
End
Attribute VB_Name = "main_cxtj_xscx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
'向combo1添加查询项目列表
 Combo1.AddItem ("商品名称")
 Combo1.AddItem ("批号")
 Combo1.AddItem ("票号")
 Combo1.ListIndex = 0
 Data1.RecordSource = "select * from xsd  where ((xsd.日期 between " + Chr(35) + rq1.Text + Chr(35) + "and " + Chr(35) + rq2.Text + Chr(35) + "))"
 Data1.Refresh
End Sub
Private Sub Form_Load()     '自动识别数据库路径
 Data1.DatabaseName = App.Path & "\yyjxc.mdb"
End Sub
Private Sub Form_Unload(Cancel As Integer)
 frm_main.Enabled = True
End Sub
Private Sub Command1_Click()     '查询销售信息
 Data1.RecordSource = "select * from xsd  where ((xsd.日期 between " + Chr(35) + rq1.Text + Chr(35) + "and " + Chr(35) + rq2.Text + Chr(35) + ")and(xsd." & Combo1.Text & " " & "like " + Chr(34) + Text1.Text + "*" + Chr(34) + "))"
 Data1.Refresh
End Sub
Private Sub Command2_Click()     '删除销售信息
 On Error Resume Next
 Data1.Recordset.Delete
 Data1.Refresh
End Sub
Private Sub Command3_Click()
 frm_main.Enabled = True
 Unload Me
End Sub

⌨️ 快捷键说明

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