VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "mscomctl.OCX"
Begin VB.Form BaseItem_detail 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   7725
   ClientLeft      =   1380
   ClientTop       =   420
   ClientWidth     =   8625
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   7725
   ScaleWidth      =   8625
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txt_EstimateFlag 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   5820
      TabIndex        =   118
      Top             =   5535
      Width           =   1995
   End
   Begin VB.TextBox txt_PRF_Id 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7965
      Locked          =   -1  'True
      TabIndex        =   115
      Text            =   "txt_PRF_Id"
      Top             =   2325
      Visible         =   0   'False
      Width           =   492
   End
   Begin VB.TextBox txt_FORM_Id 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7935
      Locked          =   -1  'True
      TabIndex        =   114
      Text            =   "txt_FORM_Id"
      Top             =   2385
      Visible         =   0   'False
      Width           =   492
   End
   Begin VB.CheckBox chk_IsASProduct 
      Caption         =   "#AS Product"
      Enabled         =   0   'False
      Height          =   255
      Left            =   2760
      TabIndex        =   108
      Top             =   5145
      Width           =   1575
   End
   Begin VB.Frame frm_Language 
      BackColor       =   &H00FFFFFF&
      ClipControls    =   0   'False
      ForeColor       =   &H00FFFFFF&
      Height          =   4485
      Left            =   1320
      TabIndex        =   106
      Top             =   960
      Visible         =   0   'False
      Width           =   855
      Begin MSComctlLib.ListView lvw_Language 
         Height          =   4215
         Left            =   120
         TabIndex        =   107
         TabStop         =   0   'False
         Top             =   120
         Width           =   480
         _ExtentX        =   847
         _ExtentY        =   7435
         LabelWrap       =   0   'False
         HideSelection   =   -1  'True
         TextBackground  =   -1  'True
         _Version        =   393217
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         Appearance      =   0
         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
         NumItems        =   0
      End
   End
   Begin VB.CommandButton ssc_Colour_More 
      Caption         =   "+"
      Height          =   255
      Left            =   4440
      TabIndex        =   9
      Top             =   2460
      Width           =   255
   End
   Begin VB.TextBox txt_shcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7980
      Locked          =   -1  'True
      TabIndex        =   55
      Text            =   "txt_shcode"
      Top             =   2040
      Visible         =   0   'False
      Width           =   492
   End
   Begin VB.TextBox txt_Gauge 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   285
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   79
      Top             =   5130
      Width           =   1092
   End
   Begin VB.ListBox lst_On_What 
      Height          =   1035
      ItemData        =   "BI_DET.frx":0000
      Left            =   6480
      List            =   "BI_DET.frx":0002
      TabIndex        =   44
      Top             =   3660
      Width           =   1860
   End
   Begin VB.CommandButton Cmd_Special 
      Caption         =   "Specials"
      Height          =   315
      Left            =   120
      TabIndex        =   77
      Top             =   6285
      Width           =   2535
   End
   Begin VB.TextBox txt_pscode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   57
      Text            =   "txt_pscode"
      Top             =   3180
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.TextBox txt_ColourMore 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   4740
      Locked          =   -1  'True
      TabIndex        =   10
      Top             =   2460
      Visible         =   0   'False
      Width           =   2715
   End
   Begin VB.TextBox txt_colour 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   8
      Top             =   2460
      Width           =   3015
   End
   Begin VB.TextBox txt_colcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00FF0000&
      Height          =   288
      Left            =   1800
      Locked          =   -1  'True
      TabIndex        =   58
      Text            =   "txt_colcode"
      Top             =   2460
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.CommandButton cmd_Plant 
      Caption         =   "Plant"
      Height          =   312
      Left            =   4440
      TabIndex        =   18
      Top             =   1020
      Width           =   3075
   End
   Begin VB.CommandButton cmd_Supplier 
      Caption         =   "Supplier"
      Height          =   315
      Left            =   4740
      TabIndex        =   20
      Top             =   1320
      Width           =   3075
   End
   Begin VB.CommandButton cmd_Year 
      Caption         =   "Year of activity"
      Height          =   312
      Left            =   5520
      TabIndex        =   24
      Top             =   6285
      Width           =   2295
   End
   Begin VB.TextBox txt_ArmstrongCode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7440
      Locked          =   -1  'True
      TabIndex        =   75
      Text            =   "txt_ArmstrongCode"
      Top             =   300
      Visible         =   0   'False
      Width           =   1104
   End
   Begin VB.TextBox txt_OriginCode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   74
      Text            =   "txt_OriginCode"
      Top             =   1020
      Visible         =   0   'False
      Width           =   1104
   End
   Begin VB.ListBox lst_Year 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   1035
      ItemData        =   "BI_DET.frx":0004
      Left            =   5520
      List            =   "BI_DET.frx":0006
      TabIndex        =   25
      Top             =   6585
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.TextBox txt_dropp 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   3840
      Locked          =   -1  'True
      TabIndex        =   45
      Top             =   5925
      Width           =   552
   End
   Begin VB.TextBox txt_origin 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   3
      Top             =   1020
      Width           =   3015
   End
   Begin VB.TextBox txt_IntFlag 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   5820
      TabIndex        =   17
      Top             =   5925
      Width           =   1995
   End
   Begin VB.TextBox txt_SBMcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1440
      Locked          =   -1  'True
      TabIndex        =   26
      Text            =   "txt_SBMcode"
      Top             =   1740
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.TextBox txt_DurableEdge 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   5820
      Locked          =   -1  'True
      TabIndex        =   15
      Top             =   5190
      Width           =   1995
   End
   Begin VB.TextBox txt_SupBaseMat 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   5
      Top             =   1740
      Width           =   1332
   End
   Begin VB.TextBox txt_psegm 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   12
      Top             =   3180
      Width           =   3015
   End
   Begin VB.TextBox txt_PrivLabel 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   4
      Top             =   1380
      Width           =   3015
   End
   Begin VB.TextBox txt_szCode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7680
      TabIndex        =   67
      Text            =   "txt_szcode"
      Top             =   1620
      Visible         =   0   'False
      Width           =   852
   End
   Begin VB.TextBox Txt_measurement 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7380
      TabIndex        =   66
      Text            =   "Txt_measurement"
      Top             =   1200
      Visible         =   0   'False
      Width           =   1332
   End
   Begin VB.TextBox Txt_category 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7260
      Locked          =   -1  'True
      TabIndex        =   65
      Text            =   "Txt_category"
      Top             =   2520
      Visible         =   0   'False
      Width           =   1332
   End
   Begin VB.TextBox txt_pvcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00FF0000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   64
      Text            =   "txt_pvcode"
      Top             =   1380
      Visible         =   0   'False
      Width           =   1332
   End
   Begin VB.TextBox Txt_armstrong 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7440
      Locked          =   -1  'True
      TabIndex        =   63
      Text            =   "Txt_armstrong"
      Top             =   540
      Visible         =   0   'False
      Width           =   1104
   End
   Begin VB.TextBox txt_bmcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   62
      Text            =   "txt_bmcode"
      Top             =   1800
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.TextBox txt_PEcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   61
      Text            =   "txt_pecode"
      Top             =   2820
      Visible         =   0   'False
      Width           =   432
   End
   Begin VB.TextBox txt_sfcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   8040
      Locked          =   -1  'True
      TabIndex        =   60
      Text            =   "txt_sfcode"
      Top             =   1860
      Visible         =   0   'False
      Width           =   372
   End
   Begin VB.TextBox txt_pfcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1500
      Locked          =   -1  'True
      TabIndex        =   59
      Text            =   "txt_pfcode"
      Top             =   2100
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.TextBox txt_ppcode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   56
      Text            =   "txt_ppcode"
      Top             =   2880
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.TextBox txt_mscode 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      BorderStyle     =   0  'None
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   7680
      Locked          =   -1  'True
      TabIndex        =   54
      Text            =   "txt_mscode"
      Top             =   1020
      Visible         =   0   'False
      Width           =   888
   End
   Begin VB.CommandButton cmd_Former 
      Caption         =   "Former"
      Height          =   312
      Left            =   2820
      TabIndex        =   22
      Top             =   6285
      Width           =   2520
   End
   Begin VB.ListBox lst_Supplier 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   840
      ItemData        =   "BI_DET.frx":0008
      Left            =   4740
      List            =   "BI_DET.frx":000A
      Sorted          =   -1  'True
      TabIndex        =   21
      Top             =   1620
      Visible         =   0   'False
      Width           =   3030
   End
   Begin VB.ListBox lst_Former 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   1035
      ItemData        =   "BI_DET.frx":000C
      Left            =   2820
      List            =   "BI_DET.frx":000E
      Sorted          =   -1  'True
      TabIndex        =   23
      Top             =   6585
      Visible         =   0   'False
      Width           =   2505
   End
   Begin VB.TextBox txt_drawn 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   540
      Locked          =   -1  'True
      TabIndex        =   47
      Top             =   7665
      Visible         =   0   'False
      Width           =   1104
   End
   Begin VB.TextBox txt_part 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   540
      Locked          =   -1  'True
      TabIndex        =   46
      Top             =   7065
      Visible         =   0   'False
      Width           =   1104
   End
   Begin VB.TextBox txt_launch 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   14
      Top             =   5565
      Width           =   3015
   End
   Begin VB.TextBox txt_dropp_date 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   16
      Top             =   5925
      Width           =   2475
   End
   Begin VB.TextBox txt_pattern 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   11
      Top             =   2820
      Width           =   3015
   End
   Begin VB.TextBox txt_family 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   7
      Top             =   2100
      Width           =   3015
   End
   Begin VB.TextBox txt_basemat 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   6
      Top             =   1740
      Width           =   1635
   End
   Begin VB.TextBox txt_desc 
      BackColor       =   &H00C0C0C0&
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   315
      Left            =   1860
      Locked          =   -1  'True
      TabIndex        =   2
      Top             =   660
      Width           =   5655
   End
   Begin VB.TextBox txt_sap 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   0
      Top             =   120
      Width           =   1512
   End
   Begin VB.TextBox txt_short 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   288
      Left            =   4860
      Locked          =   -1  'True
      TabIndex        =   1
      Top             =   120
      Width           =   1170
   End
   Begin VB.PictureBox pic_pics 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ClipControls    =   0   'False
      ForeColor       =   &H80000008&
      Height          =   4800
      Left            =   7920
      ScaleHeight     =   4770
      ScaleWidth      =   630
      TabIndex        =   35
      Top             =   2880
      Width           =   665
      Begin VB.PictureBox pic_help 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         DragIcon        =   "BI_DET.frx":0010
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   43
         Top             =   4200
         Width           =   480
      End
      Begin VB.PictureBox pic_refresh 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         Height          =   480
         Left            =   72
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   42
         Top             =   3000
         Width           =   480
      End
      Begin VB.PictureBox pic_log 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         DragIcon        =   "BI_DET.frx":031A
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   41
         Top             =   2400
         Width           =   480
      End
      Begin VB.PictureBox pic_print 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   40
         Top             =   1800
         Width           =   480
      End
      Begin VB.PictureBox pic_delete 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   39
         Top             =   1200
         Width           =   480
      End
      Begin VB.PictureBox pic_upd 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         DragIcon        =   "BI_DET.frx":0624
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   38
         Top             =   600
         Width           =   480
      End
      Begin VB.PictureBox pic_add 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         DragIcon        =   "BI_DET.frx":092E
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   37
         Top             =   48
         Width           =   480
      End
      Begin VB.PictureBox pic_quit 
         Appearance      =   0  'Flat
         AutoSize        =   -1  'True
         BackColor       =   &H80000005&
         BorderStyle     =   0  'None
         DragIcon        =   "BI_DET.frx":0C38
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   480
         Left            =   60
         ScaleHeight     =   480
         ScaleWidth      =   480
         TabIndex        =   36
         Top             =   3600
         Width           =   480
      End
   End
   Begin VB.PictureBox pic_Language 
      BorderStyle     =   0  'None
      DragIcon        =   "BI_DET.frx":0F42
      DrawStyle       =   5  'Transparent
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   480
      Left            =   1380
      ScaleHeight     =   480
      ScaleWidth      =   480
      TabIndex        =   71
      TabStop         =   0   'False
      Top             =   540
      Width           =   480
   End
   Begin VB.PictureBox pic_Armstrong 
      AutoSize        =   -1  'True
      Height          =   585
      Left            =   6720
      Picture         =   "BI_DET.frx":124C
      ScaleHeight     =   525
      ScaleWidth      =   1800
      TabIndex        =   28
      Top             =   0
      Width           =   1860
   End
   Begin VB.ListBox lst_SKU 
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   840
      ItemData        =   "BI_DET.frx":26F8
      Left            =   4440
      List            =   "BI_DET.frx":26FA
      Sorted          =   -1  'True
      TabIndex        =   19
      Top             =   1320
      Visible         =   0   'False
      Width           =   3030
   End
   Begin MSComctlLib.ImageList img_pictList 
      Left            =   2040
      Top             =   7305
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      MaskColor       =   8388736
      _Version        =   393216
   End
   Begin VB.Frame ssp_ceilings 
      BorderStyle     =   0  'None
      Caption         =   "Frame1"
      Height          =   1575
      Left            =   60
      TabIndex        =   80
      Top             =   3510
      Width           =   7800
      Begin VB.TextBox txt_perforationDesc 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   117
         Top             =   1215
         Width           =   3000
      End
      Begin VB.TextBox txt_formDesc 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   5760
         Locked          =   -1  'True
         TabIndex        =   113
         Top             =   105
         Width           =   1995
      End
      Begin VB.TextBox txt_shape 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   85
         Top             =   840
         Width           =   3000
      End
      Begin VB.TextBox txt_edge 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   84
         Top             =   120
         Width           =   3000
      End
      Begin VB.TextBox txt_surf 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   83
         Top             =   480
         Width           =   3000
      End
      Begin VB.TextBox txt_size 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   5760
         Locked          =   -1  'True
         TabIndex        =   82
         Top             =   840
         Width           =   1995
      End
      Begin VB.TextBox txt_perf 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   5760
         Locked          =   -1  'True
         TabIndex        =   81
         Top             =   480
         Width           =   1095
      End
      Begin VB.Label lbl_perforation 
         Caption         =   "#Perf. Design"
         Height          =   255
         Left            =   60
         TabIndex        =   116
         Top             =   1245
         Width           =   1290
      End
      Begin VB.Label lbl_form 
         Caption         =   "#Form"
         Height          =   255
         Left            =   4440
         TabIndex        =   112
         Top             =   180
         Width           =   1005
      End
      Begin VB.Label lbl_shape 
         Caption         =   "Shape"
         Height          =   255
         Left            =   60
         TabIndex        =   90
         Top             =   900
         Width           =   1290
      End
      Begin VB.Label lbl_edge 
         Caption         =   "Edge"
         Height          =   255
         Left            =   60
         TabIndex        =   89
         Top             =   180
         Width           =   1290
      End
      Begin VB.Label lbl_surf 
         Caption         =   "Surface"
         Height          =   255
         Left            =   60
         TabIndex        =   88
         Top             =   540
         Width           =   1290
      End
      Begin VB.Label lbl_size 
         Caption         =   "Module"
         Height          =   255
         Left            =   4440
         TabIndex        =   87
         Top             =   900
         Width           =   1005
      End
      Begin VB.Label lbl_perf 
         Caption         =   "Fire perf."
         Height          =   255
         Left            =   4440
         TabIndex        =   86
         Top             =   540
         Width           =   1005
      End
   End
   Begin VB.Frame ssp_grids 
      BorderStyle     =   0  'None
      Caption         =   "Frame1"
      Height          =   1200
      Left            =   60
      TabIndex        =   91
      Top             =   3510
      Width           =   7755
      Begin VB.TextBox txt_CPT_Id 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   6918
         Locked          =   -1  'True
         TabIndex        =   111
         Text            =   "txt_CPT_Id"
         Top             =   120
         Visible         =   0   'False
         Width           =   792
      End
      Begin VB.TextBox txt_componentTypeDesc 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   6135
         Locked          =   -1  'True
         TabIndex        =   110
         Top             =   120
         Width           =   1575
      End
      Begin VB.TextBox txt_Group 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   98
         Top             =   120
         Width           =   3015
      End
      Begin VB.TextBox txt_Thick 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   3630
         TabIndex        =   97
         Top             =   480
         Visible         =   0   'False
         Width           =   705
      End
      Begin VB.TextBox txt_Width 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   96
         Top             =   840
         Width           =   975
      End
      Begin VB.TextBox txt_Length 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   3240
         Locked          =   -1  'True
         TabIndex        =   95
         Top             =   840
         Width           =   1095
      End
      Begin VB.TextBox txt_Weight 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   3000
         Locked          =   -1  'True
         TabIndex        =   94
         Top             =   480
         Visible         =   0   'False
         Width           =   600
      End
      Begin VB.TextBox txt_Height 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   5760
         Locked          =   -1  'True
         TabIndex        =   93
         Top             =   840
         Width           =   1995
      End
      Begin VB.TextBox Txt_CorrosionDesc 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1320
         Locked          =   -1  'True
         TabIndex        =   92
         Top             =   480
         Width           =   975
      End
      Begin VB.TextBox txt_Corrosion 
         BackColor       =   &H00C0C0C0&
         ForeColor       =   &H00000000&
         Height          =   288
         Left            =   1500
         Locked          =   -1  'True
         TabIndex        =   105
         Top             =   480
         Visible         =   0   'False
         Width           =   792
      End
      Begin VB.Label lbl_componentType 
         Caption         =   "#Component Type"
         Height          =   255
         Left            =   4500
         TabIndex        =   109
         Top             =   180
         Width           =   1515
      End
      Begin VB.Label lbl_Group 
         Caption         =   "Group"
         Height          =   255
         Left            =   60
         TabIndex        =   104
         Top             =   180
         Width           =   1290
      End
      Begin VB.Label lbl_Length 
         Caption         =   "Length"
         Height          =   255
         Left            =   2400
         TabIndex        =   103
         Top             =   900
         Width           =   885
      End
      Begin VB.Label lbl_Width 
         Caption         =   "Width"
         Height          =   255
         Left            =   60
         TabIndex        =   102
         Top             =   900
         Width           =   1005
      End
      Begin VB.Label lbl_corrosion 
         Caption         =   "Corrosion"
         Height          =   255
         Left            =   60
         TabIndex        =   101
         Top             =   540
         Width           =   1290
      End
      Begin VB.Label lbl_Weight 
         Caption         =   "Weight"
         Height          =   255
         Left            =   2400
         TabIndex        =   100
         Top             =   540
         Visible         =   0   'False
         Width           =   600
      End
      Begin VB.Label lbl_Height 
         Caption         =   "Height"
         Height          =   255
         Left            =   4440
         TabIndex        =   99
         Top             =   900
         Width           =   1005
      End
   End
   Begin VB.Label lbl_EstimateFlag 
      Caption         =   "Estimate flag"
      Height          =   255
      Left            =   4500
      TabIndex        =   119
      Top             =   5610
      Width           =   1290
   End
   Begin VB.Label lbl_Gauge 
      Caption         =   "Gauge"
      Height          =   255
      Left            =   120
      TabIndex        =   78
      Top             =   5205
      Width           =   1290
   End
   Begin VB.Label lbl_IntDesc 
      Caption         =   "lbl_IntDesc"
      Height          =   195
      Left            =   7680
      TabIndex        =   76
      Top             =   1440
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.Label lbl_IntFlag 
      Caption         =   "Internet flag"
      Height          =   255
      Left            =   4500
      TabIndex        =   73
      Top             =   5985
      Width           =   1290
   End
   Begin VB.Label lbl_DurableEdge 
      Caption         =   "Durable edge"
      Height          =   255
      Left            =   4500
      TabIndex        =   72
      Top             =   5250
      Width           =   1290
   End
   Begin VB.Label lbl_Armstrong 
      Caption         =   "Armstrong product :"
      ForeColor       =   &H00000000&
      Height          =   210
      Left            =   6900
      TabIndex        =   70
      Top             =   900
      Visible         =   0   'False
      Width           =   840
   End
   Begin VB.Label lbl_Measurement 
      Caption         =   "Measurement system :"
      ForeColor       =   &H00000000&
      Height          =   240
      Left            =   7680
      TabIndex        =   69
      Top             =   780
      Visible         =   0   'False
      Width           =   825
   End
   Begin VB.Label lbl_Category 
      Caption         =   "Category : "
      ForeColor       =   &H00000000&
      Height          =   225
      Left            =   7620
      TabIndex        =   68
      Top             =   2340
      Visible         =   0   'False
      Width           =   900
   End
   Begin VB.Label lbl_drawn 
      Caption         =   "Drawn"
      Height          =   255
      Left            =   540
      TabIndex        =   53
      Top             =   7365
      Visible         =   0   'False
      Width           =   1290
   End
   Begin VB.Label lbl_part 
      Caption         =   "System part."
      Height          =   255
      Left            =   540
      TabIndex        =   52
      Top             =   6765
      Visible         =   0   'False
      Width           =   1290
   End
   Begin VB.Label lbl_psegm 
      Caption         =   "Product segm"
      Height          =   255
      Left            =   120
      TabIndex        =   51
      Top             =   3240
      Width           =   1290
   End
   Begin VB.Label lbl_launch 
      Caption         =   "Launch date"
      Height          =   255
      Left            =   120
      TabIndex        =   50
      Top             =   5625
      Width           =   1290
   End
   Begin VB.Label lbl_dropp 
      Caption         =   "Dropped date"
      Height          =   255
      Left            =   120
      TabIndex        =   49
      Top             =   5985
      Width           =   1290
   End
   Begin VB.Label lbl_pattern 
      Caption         =   "Pattern"
      Height          =   255
      Left            =   120
      TabIndex        =   48
      Top             =   2880
      Width           =   1290
   End
   Begin VB.Label lbl_family 
      Caption         =   "Family"
      Height          =   255
      Left            =   120
      TabIndex        =   34
      Top             =   2160
      Width           =   1275
   End
   Begin VB.Label lbl_colour 
      Caption         =   "Colour"
      Height          =   255
      Left            =   120
      TabIndex        =   33
      Top             =   2520
      Width           =   1290
   End
   Begin VB.Label lbl_baseMat 
      Caption         =   "Base material"
      Height          =   255
      Left            =   120
      TabIndex        =   32
      Top             =   1800
      Width           =   1275
   End
   Begin VB.Label lbl_private 
      Caption         =   "Private label"
      Height          =   255
      Left            =   120
      TabIndex        =   31
      Top             =   1440
      Width           =   1275
   End
   Begin VB.Label lbl_origin 
      Caption         =   "Origin"
      Height          =   255
      Left            =   120
      TabIndex        =   30
      Top             =   1080
      Width           =   1275
   End
   Begin VB.Label lbl_descr 
      Caption         =   "Description"
      Height          =   255
      Left            =   120
      TabIndex        =   29
      Top             =   720
      Width           =   1275
   End
   Begin VB.Label lbl_SAP 
      Caption         =   "SAP code"
      Height          =   255
      Left            =   120
      TabIndex        =   27
      Top             =   180
      Width           =   1275
   End
   Begin VB.Label lbl_short 
      Caption         =   "Short code"
      Height          =   255
      Left            =   3660
      TabIndex        =   13
      Top             =   180
      Width           =   1170
   End
End
Attribute VB_Name = "BaseItem_detail"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'what is new
'2.7.1 : Default product group - market link configuration for inserting new Base Items (JN)

Private Sub ReadConstants()
Dim ls_Field As String
Dim ls_Text As String
Dim ls_Title As String
Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

    On Error GoTo ReadConstants_Err
    
    ls_req = "EXEC Screen_Csts 'baseitm', '" & gut_LangLogin.Code & "'"
    If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
        li_Status = SQL_SUCCESS
    Else
        li_Status = SQL_ERROR
    End If
    
    Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
        li_Status = SQLFetch(ll_Statement)
        If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
            ls_Field = ODBCData(ll_Statement, 1)
            ls_Text = ODBCData(ll_Statement, 2)
            
            Select Case ls_Field
            Case "lbl_sap": lbl_SAP = ls_Text
            Case "lbl_perf": lbl_perf = ls_Text
            Case "lbl_private": lbl_private = ls_Text
            Case "lbl_weight": lbl_Weight = ls_Text
            Case "lbl_origin": lbl_origin = ls_Text
            Case "lbl_short": lbl_short = ls_Text
            Case "lbl_descr": lbl_Descr = ls_Text
            Case "lbl_size": lbl_Size = ls_Text
            Case "lbl_basemat": lbl_BaseMat = ls_Text
            Case "lbl_edge": lbl_Edge = ls_Text
            Case "lbl_surf": lbl_surf = ls_Text
            Case "lbl_family": lbl_Family = ls_Text
            Case "lbl_colour":  lbl_Colour = ls_Text
            Case "lbl_psegm": lbl_psegm = ls_Text
            Case "lbl_shape": lbl_Shape = ls_Text
            Case "lbl_drawn": lbl_drawn = ls_Text
            Case "lbl_part": lbl_part = ls_Text
            Case "lbl_launch": lbl_launch = ls_Text
            Case "lbl_dropp": lbl_dropp = ls_Text
            Case "lbl_plant": cmd_Plant.Caption = ls_Text
            Case "lbl_pattern": lbl_Pattern = ls_Text
            Case "lbl_activity": cmd_Year.Caption = ls_Text
            Case "lbl_length": lbl_length = ls_Text
            Case "lbl_width": lbl_Width = ls_Text
            Case "lbl_height": lbl_height = ls_Text
            Case "lbl_weight": lbl_Weight = ls_Text
            Case "lbl_corr": lbl_Corrosion = ls_Text
            Case "lbl_group": Lbl_group = ls_Text
            Case "lbl_supplier": cmd_Supplier.Caption = ls_Text
            Case "cmd_former": cmd_Former.Caption = ls_Text
            Case "lbl_category": lbl_Category = ls_Text
            Case "lbl_measurement": lbl_Measurement = ls_Text
            Case "lbl_armstrong": lbl_armstrong = ls_Text
            Case "lbl_duredge": lbl_DurableEdge = ls_Text
            Case "lbl_gauge": lbl_Gauge = ls_Text
            Case "lbl_intflag": lbl_IntFlag = ls_Text
            Case "lbl_IntDesc": lbl_IntDesc = ls_Text
            Case "chk_IsASProduct": chk_IsASProduct.Caption = ls_Text
            Case "lbl_form": lbl_form.Caption = ls_Text
            Case "lbl_perforation": lbl_Perforation.Caption = ls_Text
            Case "lbl_componentType": lbl_componentType.Caption = ls_Text
            End Select
        End If
    Loop
    
    SQLFreeStatement ll_Statement, SQL_DROP
    
    Exit Sub

ReadConstants_Err:
    SQLFreeStatement ll_Statement, SQL_DROP
End Sub
Private Sub cmd_Former_Click()

MouseOff
If lst_Former.Visible Then
    lst_Former.Visible = KO
Else
    lst_Former.Visible = OK
    FillFormer
End If
MouseOn

End Sub

Private Sub cmd_Plant_Click()

MouseOff
If lst_SKU.Visible Then
    lst_SKU.Visible = KO
Else
    lst_SKU.Visible = OK
    FillSKUC
End If
MouseOn

End Sub

'By chab1 BEGIN
Private Sub Cmd_Special_Click()
Dim i As Integer
    gut_Param.Str1 = gut_LangWork.Code  ' Work Language
    gut_Param.Str2 = txt_Category   ' Category
    gut_Param.Str3 = txt_basemat ' Base material
    gut_Param.Str4 = txt_SupBaseMat ' Super base material
    gut_Param.Str5 = txt_family     ' Familly
    gut_Param.Str6 = txt_pattern     ' Pattern
    gut_Param.Str7 = txt_psegm       'Product segmentation
    If (gs_CGCode = "C001" Or gs_CGCode = "C006") Then   ' Group/Edge detail
     gut_Param.Str8 = txt_edge
    Else
      gut_Param.Str8 = txt_Group
    End If
    gut_Param.Str9 = txt_surf        ' Surface
    gut_Param.Str10 = txt_shape   ' Shape
    gs_Param2Req1 = "EXEC Screen_Csts 'Base_Item_Spc', '" & gut_LangLogin.Code & "'"
    gs_Param2Req2 = "EXEC Special_Product_Lst " & "  '" & gut_Param.Str1 & "','" _
                                                   & gut_Param.Str2 & "','" & gut_Param.Str3 & "','" _
                                                   & gut_Param.Str4 & "','" & gut_Param.Str5 & "','" _
                                                   & gut_Param.Str6 & "','" & gut_Param.Str7 & "','" _
                                                   & gut_Param.Str8 & "','" & gut_Param.Str9 & "','" _
                                                   & gut_Param.Str10 & "'"
    gi_GridWidth2(0) = 1000 ' Launch date
    gi_GridWidth2(1) = 1300 ' SAP code
    gi_GridWidth2(2) = 1    ' Category
    gi_GridWidth2(3) = 1    ' Base material
    gi_GridWidth2(4) = 1    ' Super base material
    gi_GridWidth2(5) = 1    ' Family
    gi_GridWidth2(6) = 1    ' Pattern
    gi_GridWidth2(7) = 1    ' Product segmentation
    gi_GridWidth2(8) = 1    ' Group/edge detail
    gi_GridWidth2(9) = 1    ' Surface
    gi_GridWidth2(10) = 1   ' Shape
    gi_GridWidth2(11) = 1000    ' Color
    gi_GridWidth2(12) = 1500    ' Dimention
    gi_GridWidth2(13) = 4500    ' Description
    If (gs_CGCode = "C001" Or gs_CGCode = "C006") Then  ' Anti corrosive
        gi_GridWidth2(14) = 1
    Else
        gi_GridWidth2(14) = 1000
    End If
    For i = 15 To 29
        gi_GridWidth2(i) = 1
    Next i
    gi_GridNbColumns = 16
    LoadForm BaseItem_Special
End Sub
'By Chab1 END

Private Sub cmd_Supplier_Click()

MouseOff
If lst_Supplier.Visible Then
    lst_Supplier.Visible = KO
Else
    lst_Supplier.Visible = OK
    FillSupplier
End If
MouseOn

End Sub
Private Sub cmd_year_click()

MouseOff
If lst_Year.Visible Then
    lst_Year.Visible = KO
Else
    lst_Year.Visible = OK
    FillYearActivity
End If
MouseOn

End Sub

Private Sub lvw_Language_Click()

MouseOff
If Not lvw_Language.SelectedItem Is Nothing Then
    frm_Language.Visible = KO
    gut_LangWork.Code = GetTagValue(lvw_Language.SelectedItem, 0)
    gut_LangWork.Desc = GetTagValue(lvw_Language.SelectedItem, 1)
    gut_LangWork.Icon = GetTagValue(lvw_Language.SelectedItem, 2)
    
'    gut_LangWork.Code = csp_Language.ListTabText(csp_Language.ListIndex, 1)
'    gut_LangWork.Desc = csp_Language.ListTabText(csp_Language.ListIndex, 2)
'    gut_LangWork.Icon = csp_Language.ListTabText(csp_Language.ListIndex, 3)
    gs_TableName = "Base_Item_Desc"
    gi_TranslateType = 1
    ClearParam
    gut_Param.Str2 = gut_LangWork.Code
    gb_Return = KO
    BaseItemDesc_mtnc.show 1
    If gb_Return Then
        GetValues
    End If
End If
MouseOn

End Sub


Private Sub Form_Click()

lst_On_What.Visible = KO
'csp_Language.Visible = KO
lvw_Language.Visible = KO

End Sub
Private Sub Form_Load()

On Error GoTo suite

MouseOff

If gl_CodePage <> 1252 And gl_CodePage <> 0 Then ChangeCharset Me

pic_add.Picture = LoadResPicture(RES_ADD, 1)
pic_delete.Picture = LoadResPicture(RES_DELETE, 1)
pic_upd.Picture = LoadResPicture(RES_MODIFY, 1)
pic_quit.Picture = LoadResPicture(RES_QUIT, 1)
pic_Print.Picture = LoadResPicture(RES_PRINT, 1)
pic_refresh.Picture = LoadResPicture(RES_REFRESH, 1)
pic_help.Picture = LoadResPicture(RES_HELP, 1)
pic_log.Picture = LoadResPicture(RES_LOG, 1)
pic_Language.Picture = LoadResPicture(RES_MULTILANG, 1)
pic_Armstrong.Picture = LoadResPicture(RES_LOGO, 0)
gut_LangWork = gut_LangLogin

Debug.Print frmMain.Top, frmMain.Left

Top = 1580 + frmMain.Top
Left = 3280 + frmMain.Left
Width = 8650
Height = 7750

    ' NEW remove ListView begin
    Call InitImageList(img_pictList)
    Call InitListView(lvw_Language, img_pictList)
    ' NEW remove ListView end

ReadConstants
GetValues
DisplayMissingLists

cmd_Supplier.Left = 4440
cmd_Supplier.Top = 1020
lst_Supplier.Left = 4440
lst_Supplier.Top = 1320

Select Case gs_CGCode
Case "C001"
    ssp_ceilings.Visible = OK
    ssp_grids.Visible = KO
Case "C006"
    ssp_ceilings.Visible = OK
    ssp_grids.Visible = KO
    lbl_DurableEdge.Visible = KO
    txt_DurableEdge.Visible = KO
Case Else
    ssp_ceilings.Visible = KO
    ssp_grids.Visible = OK
    lbl_DurableEdge.Visible = KO
    txt_DurableEdge.Visible = KO
End Select
Permission
'FillCspLanguage csp_Language
FillLvwLanguage lvw_Language
FillListOnWhat
MouseOn
Exit Sub

suite:
StdError
End Sub
Private Sub Form_Unload(Cancel As Integer)

gut_LangWork = gut_LangLogin

End Sub

Private Sub lst_On_What_Click()

On Error GoTo suite

MouseOff
Select Case lst_On_What
Case "Item"
    gb_Return = KO
    BaseItem_mtnc.show 1
    If gb_Return Then
        BaseItem_main.SearchLeaf (gs_SAPCode)       ' 26.05.2005 julo - tv repositioning
'        BaseItem_main.Picoutl_refresh_Click
        GetValues
    End If
Case "Former code"
    If gs_SAPCode <> "" Then
        BaseItemFormer_mtnc.show 1
    End If
    If lst_Former.Visible Then
        FillFormer
    End If
    lst_On_What.Visible = KO
Case "Plant"
    If txt_OriginCode = "Manufactured" Then
        BaseItemPlant_mtnc.show 1
        If lst_SKU.Visible Then
            FillSKUC
        End If
    Else
        MsgBox "Impossible with this Origin Code.", 48
    End If
    lst_On_What.Visible = KO
Case "Item Activity"
    BaseItemYear_mtnc.show 1
    If lst_Year.Visible Then
        FillYearActivity
    End If
    lst_On_What.Visible = KO
Case "System Part"
    SendMessage 65, "Module waiting for more informations.", gut_LangLogin.Code
    lst_On_What.Visible = KO
Case "Replacement Item"
    SendMessage 65, "Module waiting for more informations.", gut_LangLogin.Code
    lst_On_What.Visible = KO
Case "Suppliers"
    If txt_OriginCode = "Manufactured" Then
        MsgBox "Impossible with this Origin Code.", 48
    Else
        BaseItemSupplier_mtnc.show 1
        If lst_Supplier.Visible Then
            FillSupplier
        End If
    End If
    lst_On_What.Visible = KO
End Select
MouseOn
Exit Sub

suite:
StdError
End Sub
Private Sub FillSupplier()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

ls_req = "EXEC Base_Item_Suppliers_sel '" _
    & gs_SAPCode & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
lst_Supplier.Clear
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        lst_Supplier.AddItem ODBCData(ll_Statement, 1)
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub FillFormer()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

lst_Former.Clear
ls_req = " EXEC Converting_lst '" _
    & gs_SAPCode & "','Prod DB','XXX'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        lst_Former.AddItem ODBCData(ll_Statement, 1)
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub FillYearActivity()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

lst_Year.Clear
ls_req = "EXEC Item_Activity_sel '" _
    & gs_SAPCode & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        lst_Year.AddItem ODBCData(ll_Statement, 1)
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub FillColourMore()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

txt_ColourMore = ""
ls_req = "EXEC Colours_sel2 '" _
    & txt_colcode & "' "
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        txt_ColourMore = " R.A.L : " _
            & ODBCData(ll_Statement, 1)
        txt_ColourMore = txt_ColourMore & "     " _
            & " B.S : " _
            & ODBCData(ll_Statement, 2)
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub FillSKUC()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

ls_req = "EXEC Base_Item_Plants_t_lst '" _
    & gs_SAPCode & "', '" _
    & gut_LangLogin.Code & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
lst_SKU.Clear
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        lst_SKU.AddItem ODBCData(ll_Statement, 1)
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub GetCeiling()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer
Dim ls_Field As String
Dim ls_Text As String

On Error GoTo suite

ResetDisplay
txt_SAP = gs_SAPCode
ls_req = "EXEC Base_Item_t_sel '" _
    & gs_SAPCode & "','" _
    & gut_LangLogin.Code & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        txt_Desc = ODBCData(ll_Statement, 1)
        txt_ArmstrongCode = ODBCData(ll_Statement, 2)
        Txt_armstrong = ODBCData(ll_Statement, 3)
        txt_OriginCode = ODBCData(ll_Statement, 4)
        txt_origin = ODBCData(ll_Statement, 5)
        txt_pvcode = ODBCData(ll_Statement, 6)
        txt_PrivLabel = ODBCData(ll_Statement, 7)
        txt_pfcode = ODBCData(ll_Statement, 8)
        txt_family = ODBCData(ll_Statement, 9)
        txt_SBMcode = ODBCData(ll_Statement, 10)
        txt_SupBaseMat = ODBCData(ll_Statement, 11)
        txt_bmcode = ODBCData(ll_Statement, 12)
        txt_basemat = ODBCData(ll_Statement, 13)
        txt_ppcode = ODBCData(ll_Statement, 14)
        txt_pattern = ODBCData(ll_Statement, 15)
        txt_PEcode = ODBCData(ll_Statement, 16)
        txt_edge = ODBCData(ll_Statement, 17)
        txt_sfcode = ODBCData(ll_Statement, 18)
        txt_surf = ODBCData(ll_Statement, 19)
        txt_colcode = ODBCData(ll_Statement, 20)
        txt_colour = ODBCData(ll_Statement, 21)
        txt_pscode = ODBCData(ll_Statement, 22)
        txt_psegm = ODBCData(ll_Statement, 23)
        txt_shcode = ODBCData(ll_Statement, 24)
        txt_shape = ODBCData(ll_Statement, 25)
        txt_mscode = ODBCData(ll_Statement, 26)
        txt_Measurement = ODBCData(ll_Statement, 27)
        txt_perf = ODBCData(ll_Statement, 28)
        txt_DurableEdge = ODBCData(ll_Statement, 29)
        txt_drawn = ODBCData(ll_Statement, 30)
        txt_Category = ODBCData(ll_Statement, 32)
        txt_part = ODBCData(ll_Statement, 33)
        txt_launch = ODBCData(ll_Statement, 34)
        txt_dropp_date = ODBCData(ll_Statement, 35)
        Txt_Short = ODBCData(ll_Statement, 36)
        txt_Length = ODBCDataSingle(ll_Statement, 37)
        txt_Width = ODBCDataSingle(ll_Statement, 38)
        txt_Thick = ODBCDataSingle(ll_Statement, 40)
        txt_Gauge = ODBCDataSingle(ll_Statement, 42)
        txt_IntFlag = ODBCData(ll_Statement, 45)
        gi_BIConcurrency = ODBCData(ll_Statement, 46)
        chk_IsASProduct = IIf(ODBCData(ll_Statement, 47) = "X", 1, 0)
        txt_FORM_Id = ODBCData(ll_Statement, 48)
        txt_formDesc = ODBCData(ll_Statement, 49)
        txt_PRF_Id = ODBCData(ll_Statement, 50)
        txt_perforationDesc = ODBCData(ll_Statement, 51)
        txt_EstimateFlag = ODBCData(ll_Statement, 54)
    End If
End If
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
If txt_IntFlag = "X" Then
    txt_IntFlag = "Yes"
Else
    txt_IntFlag = "No"
End If
If txt_EstimateFlag = "X" Then
    txt_EstimateFlag = "Yes"
Else
    txt_EstimateFlag = "No"
End If
Select Case UCase(txt_ArmstrongCode)
Case "YES": pic_Armstrong.Visible = OK
Case Else: pic_Armstrong.Visible = KO
End Select
ls_req = "EXEC Base_Item_t_sel2 '" _
    & gs_SAPCode & "','" _
    & gut_LangLogin.Code & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        txt_szCode = ODBCData(ll_Statement, 1)
        If txt_szCode = "" Then
            txt_Size = txt_Length & " * " & txt_Width _
                & " * " & txt_Thick & " (mm)"
        Else
            txt_Size = LCase(ODBCData(ll_Statement, 2))
        End If
    End If
End If
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
If txt_OriginCode = "Manufactured" Then
    cmd_Plant.Visible = OK
    cmd_Supplier.Visible = KO
Else
    cmd_Plant.Visible = KO
    cmd_Supplier.Visible = OK
End If
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub GetGrid()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer
Dim ls_Field As String
Dim ls_Text As String

On Error GoTo suite

ResetDisplay
txt_SAP = gs_SAPCode
ls_req = "EXEC Base_Item_t_sel '" _
    & gs_SAPCode & "','" _
    & gut_LangLogin.Code & "'"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        txt_Desc = ODBCData(ll_Statement, 1)
        txt_ArmstrongCode = ODBCData(ll_Statement, 2)
        Txt_armstrong = ODBCData(ll_Statement, 3)
        txt_OriginCode = ODBCData(ll_Statement, 4)
        txt_origin = ODBCData(ll_Statement, 5)
        txt_pvcode = ODBCData(ll_Statement, 6)
        txt_PrivLabel = ODBCData(ll_Statement, 7)
        txt_pfcode = ODBCData(ll_Statement, 8)
        txt_family = ODBCData(ll_Statement, 9)
        txt_SBMcode = ODBCData(ll_Statement, 10)
        txt_SupBaseMat = ODBCData(ll_Statement, 11)
        txt_bmcode = ODBCData(ll_Statement, 12)
        txt_basemat = ODBCData(ll_Statement, 13)
        txt_ppcode = ODBCData(ll_Statement, 14)
        txt_pattern = ODBCData(ll_Statement, 15)
        txt_PEcode = ODBCData(ll_Statement, 16)
        txt_Group = ODBCData(ll_Statement, 17)
        txt_colcode = ODBCData(ll_Statement, 20)
        txt_colour = ODBCData(ll_Statement, 21)
        txt_pscode = ODBCData(ll_Statement, 22)
        txt_psegm = ODBCData(ll_Statement, 23)
        txt_mscode = ODBCData(ll_Statement, 26)
        txt_Measurement = ODBCData(ll_Statement, 27)
        txt_DurableEdge = ODBCData(ll_Statement, 29)
        txt_drawn = ODBCData(ll_Statement, 30)
        txt_Category = ODBCData(ll_Statement, 32)
        txt_part = ODBCData(ll_Statement, 33)
        txt_launch = ODBCData(ll_Statement, 34)
        txt_dropp_date = ODBCData(ll_Statement, 35)
        Txt_Short = ODBCData(ll_Statement, 36)
        txt_Length = ODBCDataSingle(ll_Statement, 37)
        txt_Width = ODBCDataSingle(ll_Statement, 38)
        txt_Height = ODBCDataSingle(ll_Statement, 39)
        txt_Thick = ODBCDataSingle(ll_Statement, 40)
        txt_Weight = ODBCDataSingle(ll_Statement, 41)
        txt_Gauge = ODBCDataSingle(ll_Statement, 42)
        txt_Corrosion = ODBCData(ll_Statement, 43)
        Txt_CorrosionDesc = ODBCData(ll_Statement, 44)
        txt_IntFlag = ODBCData(ll_Statement, 45)
        gi_BIConcurrency = ODBCData(ll_Statement, 46)
        chk_IsASProduct = IIf(ODBCData(ll_Statement, 47) = "X", 1, 0)
        txt_CPT_Id = ODBCData(ll_Statement, 52)
        txt_componentTypeDesc = ODBCData(ll_Statement, 53)
        txt_EstimateFlag = ODBCData(ll_Statement, 54)
    End If
End If
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
If txt_IntFlag = "X" Then
    txt_IntFlag = "Yes"
Else
    txt_IntFlag = "No"
End If
If txt_EstimateFlag = "X" Then
    txt_EstimateFlag = "Yes"
Else
    txt_EstimateFlag = "No"
End If
Select Case UCase(txt_ArmstrongCode)
Case "YES": pic_Armstrong.Visible = OK
Case Else: pic_Armstrong.Visible = KO
End Select
If txt_OriginCode = "Manufactured" Then
    cmd_Plant.Visible = OK
    cmd_Supplier.Visible = KO
Else
    cmd_Plant.Visible = KO
    cmd_Supplier.Visible = OK
End If
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub ResetDisplay()

txt_SAP = ""
txt_Desc = ""
txt_Category = ""
txt_basemat = ""
txt_family = ""
txt_edge = ""
txt_surf = ""
txt_colour = ""
txt_ColourMore.Visible = KO
txt_psegm = ""
txt_pattern = ""
txt_shape = ""
txt_part = ""
txt_launch = ""
txt_dropp = ""
txt_drawn = ""
txt_dropp_date = ""
Txt_Short = ""
txt_pvcode = ""
txt_perf = ""
txt_OriginCode = ""
txt_origin = ""
txt_ArmstrongCode = ""
Txt_armstrong = ""
txt_Size = ""
txt_PrivLabel = ""
txt_Length = ""
txt_Width = ""
txt_Height = ""
txt_Thick = ""
txt_Weight = ""
txt_Corrosion = ""
txt_szCode = ""
lst_On_What.Visible = KO
txt_bmcode = ""
txt_PEcode = ""
txt_sfcode = ""
txt_pfcode = ""
txt_colcode = ""
txt_pscode = ""
txt_ppcode = ""
txt_shcode = ""
txt_mscode = ""
txt_Gauge = ""
txt_SupBaseMat = ""
txt_DurableEdge = ""
lst_SKU.Visible = KO
lst_Supplier.Visible = KO
lst_Former.Visible = KO
lst_Year.Visible = KO
chk_IsASProduct.Value = False

End Sub
Private Sub Permission()

Dim ls_req As String
Dim ls_Perm As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

Select Case gs_BIType
Case "STD": ls_req = "EXEC Check_Security 'base_item_std', '" & prg.LoginName & "'"
Case "SPC": ls_req = "EXEC Check_Security 'base_item_spc', '" & prg.LoginName & "'"
End Select
pic_add.Visible = KO
pic_delete.Visible = KO
pic_upd.Visible = KO
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        ls_Perm = ODBCData(ll_Statement, 1)
        If ls_Perm = "Insert" And gut_LangLogin.Code = "E" Then
            pic_add.Visible = OK
        End If
        If ls_Perm = "Delete" And gut_LangLogin.Code = "E" Then
            pic_delete.Visible = OK
        End If
        If ls_Perm = "Update" And gut_LangLogin.Code = "E" Then
            pic_upd.Visible = OK
        End If
        If Left(ls_Perm, 3) = "99_" Then
            gs_TranslationRight = gs_TranslationRight & right(ls_Perm, Len(ls_Perm) - 3)
        End If
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub

Private Sub lst_On_What_LostFocus()

lst_On_What.Visible = KO

End Sub

Private Sub pic_add_Click()

On Error GoTo suite

MouseOff
gs_Action = "Add"
gb_Return = KO
BaseItem_mtnc.show 1
If gb_Return Then
    BaseItem_main.tv_BI_Outline.SearchLeaf gs_SAPCode
End If
MouseOn
Exit Sub

suite:
StdError
End Sub
Private Sub pic_help_Click()

MouseOff
gs_TableName = "Base_Item"
frm_help.show 1
MouseOn

End Sub
Private Sub pic_Language_Click()

MouseOff
frm_Language.Visible = Not frm_Language.Visible
MouseOn

End Sub


Private Sub pic_print_Click()

If Printers.Count = 0 Then
    SendMessage 135, "No printer is installed on your computer. Please, contact your system administrator.", gut_LangLogin.Code
    Exit Sub
End If

MouseOff
InitPrinter 1

'title
Printer.Font.Italic = 0
SetBold -1
SetFontSize 12
Printer.Print Date;
Printer.Print " - ";
Printer.Print Time
SetFontSize 36
Printer.Print "Armstrong Ceiling Solutions"
SetFontSize 24
Printer.Print BaseItem_main.Caption & " - " & BaseItem_main.cmd_General.Caption
SetFontSize 12
Printer.Print Tab(100 - 5);
Printer.Print Printer.Page
Printer.Print ""
SetFontSize 18
Printer.Print ""
SetFontSize 12
Printer.Print ""

'fields
PrintField lbl_SAP.Caption, txt_SAP.Text
PrintField lbl_short.Caption, Txt_Short.Text
PrintField lbl_Descr.Caption, txt_Desc.Text
PrintField lbl_origin.Caption, txt_origin.Text
PrintField lbl_private.Caption, txt_PrivLabel.Text
PrintField lbl_BaseMat.Caption, txt_SupBaseMat & " - " & txt_basemat.Text
PrintField lbl_Family.Caption, txt_family.Text
PrintField lbl_Colour.Caption, txt_colour.Text
PrintField lbl_Pattern.Caption, txt_pattern.Text
PrintField lbl_psegm.Caption, txt_psegm.Text
Printer.Print ""
'specific fields
Select Case gs_CGCode
Case "C001", "C006":
    PrintField lbl_Edge.Caption, txt_edge.Text
    PrintField lbl_surf.Caption, txt_surf.Text
    PrintField lbl_Shape.Caption, txt_shape.Text
    PrintField lbl_Size.Caption, txt_Size.Text
    PrintField lbl_Gauge.Caption, txt_Gauge.Text
    PrintField lbl_perf.Caption, txt_perf.Text

Case Else:
    PrintField Lbl_group.Caption, txt_Group.Text
    PrintField lbl_Corrosion.Caption, Txt_CorrosionDesc.Text
    PrintField lbl_height.Caption, txt_Height.Text
    PrintField lbl_length.Caption, txt_Length.Text
    PrintField lbl_Weight.Caption, txt_Weight.Text
    PrintField lbl_Width.Caption, txt_Width.Text
    PrintField lbl_Gauge.Caption, txt_Gauge.Text

End Select
Printer.Print ""
' date
PrintField lbl_launch.Caption, txt_launch.Text
PrintField lbl_dropp.Caption, txt_dropp_date.Text
PrintField lbl_DurableEdge.Caption, txt_DurableEdge.Text
PrintField lbl_IntFlag.Caption, txt_IntFlag.Text

Printer.EndDoc
MouseOn
End Sub

Private Sub pic_quit_Click()

MouseOff
Unload Me
MouseOn

End Sub
Private Sub pic_refresh_Click()

On Error GoTo suite

MouseOff
GetValues
MouseOn
Exit Sub

suite:
StdError
End Sub

Private Sub pic_upd_Click()

On Error GoTo suite

MouseOff
gs_Action = "Update"
lst_On_What.Left = 6420
lst_On_What.Top = 3660
lst_On_What.Visible = OK
lst_On_What.SetFocus
MouseOn
Exit Sub

suite:
StdError
End Sub


Private Sub ssc_Colour_More_Click()

MouseOff
If txt_ColourMore.Visible Then
    txt_ColourMore.Visible = KO
Else
    FillColourMore
    txt_ColourMore.Visible = OK
End If
MouseOn

End Sub
Private Sub pic_delete_Click()

On Error GoTo suite

MouseOff
gs_Action = "Delete"
gb_Return = KO
BaseItem_mtnc.show 1
If gb_Return Then
    BaseItem_main.tv_BI_Outline.LocalDelItem gs_SAPCode
    Unload Me
End If
MouseOn
Exit Sub

suite:
StdError
End Sub

Private Sub FillListOnWhat()

Dim ls_req As String
Dim ll_Statement As Long
Dim li_Status As Integer

On Error GoTo suite

lst_On_What.Clear
ls_req = "EXEC Item_ListBox_lst"
If SQLSubmit(gl_Environment, gl_Database, ll_Statement, ls_req) Then
    li_Status = SQL_SUCCESS
Else
    li_Status = SQL_ERROR
End If
Do While li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO
    li_Status = SQLFetch(ll_Statement)
    If li_Status = SQL_SUCCESS Or li_Status = SQL_SUCCESS_WITH_INFO Then
        lst_On_What.AddItem ODBCData(ll_Statement, 1)
    End If
Loop
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
Exit Sub

suite:
li_Status = SQLFreeStatement(ll_Statement, SQL_DROP)
StdError
End Sub
Private Sub GetValues()

Select Case gs_CGCode
Case "C001", "C006": GetCeiling
Case Else: GetGrid
End Select

End Sub
Private Sub DisplayMissingLists()

Select Case txt_OriginCode
Case "Manufactured"
    If Not Existing_BI_Plants(gs_SAPCode) Then
        MouseOn
        SendMessage 51, "Don't forget to fill plants list, please.", gut_LangLogin.Code
        MouseOff
    End If
Case "Purchased"
    If Not Existing_BI_Suppliers(gs_SAPCode) Then
        MouseOn
        SendMessage 52, "Don't forget to fill Suppliers list, please.", gut_LangLogin.Code
        MouseOff
    End If
End Select
  
End Sub

' NEW Remove ListView begin
Private Function InsertItem(ByVal ao_lvw As MSComctlLib.ListView, ByVal as_Key As String, ByVal as_Text As String, Optional ByVal ai_pos As Integer = -1, Optional ByVal al_icon As Long = -1, Optional ByVal al_smallIcon As Long = -1, Optional ByVal al_imageType As LoadResConstants = vbResIcon) As MSComctlLib.ListItem
    Dim lo_retItem As MSComctlLib.ListItem
    Set lo_retItem = GetItem(ao_lvw, as_Key)
    If lo_retItem Is Nothing Then
        Set lo_retItem = ao_lvw.ListItems.Add(IIf(ai_pos = -1, ao_lvw.ListItems.Count + 1, ai_pos), _
                                              as_Key, _
                                              as_Text, _
                                              GetImageIndex(ao_lvw.Icons, al_icon, al_imageType), _
                                              GetImageIndex(ao_lvw.SmallIcons, al_smallIcon, al_imageType))
    End If
    Set InsertItem = lo_retItem
End Function

Private Function GetTagValue(ByVal ao_lvw As MSComctlLib.ListItem, ByVal al_Index As Long)
    Dim ls_values() As String
    ls_values = Split(ao_lvw.Tag, SEP)

    GetTagValue = ls_values(al_Index)

End Function



Private Function GetItem(ByVal ao_lvw As MSComctlLib.ListView, ByVal as_Key As String) As MSComctlLib.ListItem
    Dim lo_retItem As MSComctlLib.ListItem
    
    Set GetItem = Nothing
    For Each lo_retItem In ao_lvw.ListItems
        If lo_retItem.Key = as_Key Then
            Set GetItem = lo_retItem
            Exit For
        End If
    Next
End Function

Private Function GetImageIndex(ByVal ao_ImageList As MSComctlLib.ImageList, ByVal al_resIndex As Long, ByVal al_resType As LoadResConstants) As Variant
    If (ao_ImageList Is Nothing) Or (al_resIndex = -1) Then
        GetImageIndex = Empty
        Exit Function
    End If
    
    Dim lo_image As MSComctlLib.ListImage
    For Each lo_image In ao_ImageList.ListImages
        If lo_image.Key = "_" & al_resIndex Then
            GetImageIndex = lo_image.Index
            Exit Function
        End If
    Next
    
    GetImageIndex = LoadImage(ao_ImageList, al_resIndex, al_resType)
End Function

Private Function LoadImage(ByVal ao_ImageList As MSComctlLib.ImageList, ByVal al_resIndex As Long, ByVal al_resType As LoadResConstants) As Long
    Dim lo_image As MSComctlLib.ListImage
    Set lo_image = ao_ImageList.ListImages.Add(, "_" & al_resIndex, LoadResPicture(al_resIndex, al_resType))
    LoadImage = lo_image.Index
End Function

Private Sub InitListView(ByRef ao_lvw As MSComctlLib.ListView, Optional ByVal ao_imgList As MSComctlLib.ImageList = Nothing)
    ao_lvw.HideSelection = False        ' don't hide selection when lostFocus
    ao_lvw.View = lvwList
    ao_lvw.LabelEdit = lvwManual       ' disable edit labels
    ao_lvw.Icons = ao_imgList
    ao_lvw.SmallIcons = ao_imgList
    
    ao_lvw.Height = frm_Language.Height - 50 - ao_lvw.Top
    
End Sub

Private Sub InitImageList(ByRef ao_imgList As MSComctlLib.ImageList)
    ao_imgList.ImageHeight = 32
    ao_imgList.ImageWidth = 32
    ao_imgList.MaskColor = vbMagenta

    ' at least one image must be loaded to correctly initialize imagelist
    Call LoadImage(ao_imgList, RES_OPENFOLDER, vbResBitmap)
End Sub
' NEW Remove ListView end


