VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form inventory_rpt 
   BackColor       =   &H00C0C0FF&
   Caption         =   "Inventory Report"
   ClientHeight    =   4890
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4395
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4890
   ScaleWidth      =   4395
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command3 
      Caption         =   "Show report for all"
      Height          =   495
      Left            =   1200
      TabIndex        =   8
      Top             =   4200
      Width           =   2295
   End
   Begin MSAdodcLib.Adodc db_product 
      Height          =   615
      Left            =   960
      Top             =   4920
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   1085
      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=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=sega"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "sega"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "product"
      Caption         =   "db_product"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H00C0FFC0&
      Caption         =   "filter by product code"
      Height          =   1935
      Left            =   120
      TabIndex        =   3
      Top             =   2160
      Width           =   4215
      Begin VB.CommandButton Command1 
         Caption         =   "Show Report"
         Height          =   375
         Left            =   1200
         TabIndex        =   7
         Top             =   1080
         Width           =   1815
      End
      Begin MSDataListLib.DataCombo dc_item 
         Bindings        =   "inventory_rpt.frx":0000
         DataSource      =   "db_prod"
         Height          =   315
         Left            =   1440
         TabIndex        =   4
         Top             =   600
         Width           =   2295
         _ExtentX        =   4048
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "prod_name"
         Text            =   ""
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         Caption         =   "Item"
         ForeColor       =   &H80000008&
         Height          =   195
         Index           =   1
         Left            =   720
         TabIndex        =   5
         Top             =   720
         Width           =   300
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFC0&
      Caption         =   "Filter by category"
      Height          =   1695
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4215
      Begin VB.CommandButton Command2 
         Caption         =   "Show Report"
         Height          =   375
         Left            =   1320
         TabIndex        =   6
         Top             =   1080
         Width           =   1695
      End
      Begin MSDataListLib.DataCombo dc_cat 
         Bindings        =   "inventory_rpt.frx":0019
         DataSource      =   "db_prod"
         Height          =   315
         Left            =   1440
         TabIndex        =   1
         Top             =   600
         Width           =   2295
         _ExtentX        =   4048
         _ExtentY        =   556
         _Version        =   393216
         ListField       =   "prod_cat_code"
         Text            =   ""
      End
      Begin VB.Label Label1 
         Alignment       =   1  'Right Justify
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         Caption         =   "Category"
         ForeColor       =   &H80000008&
         Height          =   195
         Index           =   0
         Left            =   600
         TabIndex        =   2
         Top             =   720
         Width           =   630
      End
   End
End
Attribute VB_Name = "inventory_rpt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub DataCombo1_Click(Area As Integer)
'filter_Product
End Sub

Private Sub DataCombo2_Click(Area As Integer)

End Sub

Private Sub Command1_Click()
Dim rs As New ADODB.Recordset
rs.Open "select * from product where prod_name  LIKE '" & Trim(dc_item.Text) & "'", con, adOpenStatic, adLockOptimistic
Set rpt_prod_inventory.DataSource = rs

rpt_prod_inventory.Show
End Sub

Private Sub Command2_Click()

Dim rs2 As New ADODB.Recordset
rs2.Open "select * from product where prod_cat_code  LIKE " & Val(dc_cat.Text), con, adOpenStatic, adLockOptimistic
Set rpt_prod_inventory.DataSource = rs2

rpt_prod_inventory.Show
End Sub

Private Sub Command3_Click()
Dim rs1 As New ADODB.Recordset
rs1.Open "select * from product ", con, adOpenStatic, adLockOptimistic
Set rpt_prod_inventory.DataSource = rs1

rpt_prod_inventory.Show

End Sub

Private Sub Form_Load()
con.Open "DSN=sega"

End Sub

Private Sub Form_Unload(Cancel As Integer)
con.Close
Unload Me
mainform.Enabled = True
End Sub

