VERSION 5.00 Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx" Begin VB.Form frmShowOrderMat Caption = "Order Materials" ClientHeight = 4620 ClientLeft = 60 ClientTop = 345 ClientWidth = 6060 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 4620 ScaleWidth = 6060 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtPreOrder Height = 315 Left = 2370 TabIndex = 7 Top = 0 Visible = 0 'False Width = 540 End Begin LpLib.fpList lstMaterials Height = 3765 Left = 60 TabIndex = 6 Top = 345 Width = 5940 _Version = 196608 _ExtentX = 10477 _ExtentY = 6641 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 Enabled = -1 'True MousePointer = 0 Object.TabStop = 0 'False BackColor = -2147483643 ForeColor = -2147483640 Columns = 5 Sorted = 0 LineWidth = 1 SelDrawFocusRect= -1 'True ColumnSeparatorChar= 9 ColumnSearch = -1 ColumnWidthScale= 2 RowHeight = -1 MultiSelect = 0 WrapList = 0 'False WrapWidth = 0 SelMax = -1 AutoSearch = 1 SearchMethod = 0 VirtualMode = 0 'False VRowCount = 0 DataSync = 3 ThreeDInsideStyle= 1 ThreeDInsideHighlightColor= -2147483633 ThreeDInsideShadowColor= -2147483627 ThreeDInsideWidth= 1 ThreeDOutsideStyle= 1 ThreeDOutsideHighlightColor= -2147483628 ThreeDOutsideShadowColor= -2147483632 ThreeDOutsideWidth= 1 ThreeDFrameWidth= 0 BorderStyle = 0 BorderColor = -2147483642 BorderWidth = 1 ThreeDOnFocusInvert= 0 'False ThreeDFrameColor= -2147483633 Appearance = 2 BorderDropShadow= 0 BorderDropShadowColor= -2147483632 BorderDropShadowWidth= 3 ScrollHScale = 2 ScrollHInc = 0 ColsFrozen = 0 ScrollBarV = 1 NoIntegralHeight= 0 'False HighestPrecedence= 0 AllowColResize = 0 AllowColDragDrop= 0 ReadOnly = 0 'False VScrollSpecial = 0 'False VScrollSpecialType= 0 EnableKeyEvents = -1 'True EnableTopChangeEvent= -1 'True DataAutoHeadings= -1 'True DataAutoSizeCols= 2 SearchIgnoreCase= -1 'True ScrollBarH = 1 VirtualPageSize = 0 VirtualPagesAhead= 0 ExtendCol = 0 ColumnLevels = 1 ListGrayAreaColor= -2147483637 GroupHeaderHeight= -1 GroupHeaderShow = 0 'False AllowGrpResize = 0 AllowGrpDragDrop= 0 MergeAdjustView = 0 'False ColumnHeaderShow= 0 'False ColumnHeaderHeight= -1 GrpsFrozen = 0 BorderGrayAreaColor= -2147483637 ExtendRow = 0 DataField = "" OLEDragMode = 0 OLEDropMode = 0 EnableClickEvent= -1 'True Redraw = -1 'True ResizeRowToFont = 0 'False TextTipMultiLine= 0 ColDesigner = "frmShowOrderMat.frx":0000 End Begin VB.Label lblAQty AutoSize = -1 'True Caption = "Qty Delivered:" Height = 195 Left = 4935 TabIndex = 5 Top = 120 Width = 1005 End Begin VB.Label lblOQty AutoSize = -1 'True Caption = "Qty Ordered:" Height = 195 Left = 3885 TabIndex = 4 Top = 120 Width = 900 End Begin VB.Label lblDesc AutoSize = -1 'True Caption = "Description:" Height = 195 Left = 1155 TabIndex = 3 Top = 120 Width = 840 End Begin VB.Label lblInv AutoSize = -1 'True Caption = "Inv #:" Height = 195 Left = 120 TabIndex = 2 Top = 120 Width = 420 End Begin VB.Label lblInvTotal Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Invoice Total:" Height = 195 Left = 120 TabIndex = 1 Top = 4320 Width = 975 End Begin VB.Label lblTotal Alignment = 1 'Right Justify BorderStyle = 1 'Fixed Single BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 1200 TabIndex = 0 Top = 4260 Width = 1755 End End Attribute VB_Name = "frmShowOrderMat" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim mdblTOTAL As Double Private Sub OrderMatLoad() Dim oRS As Recordset Dim strSQL As String Dim strLine As String, lngRET As Long, aTabs(2) As Long Dim dblSUM As Double On Error GoTo Error_EH ' aTabs(0) = 40 ' aTabs(1) = 180 ' aTabs(2) = 230 ' aTabs(3) = 110 ' aTabs(4) = 130 mdblTOTAL = 0 If txtPreOrder = "Z" Then strSQL = "SELECT * from tblLotMatrl WHERE Lot_id = " & gintLOTID & "And (M_Type = 'Z') Order By Inv_No" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly ElseIf txtPreOrder = "P" Then strSQL = "SELECT * from tblLotMatrl WHERE Lot_id = " & gintLOTID & "And (M_Type = 'P') Order By Inv_No" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly Else strSQL = "SELECT * from tblOrdMatrl WHERE Order_id = " & glngORDERID & " Order By Inv_No" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly End If ' lngRET = SendMessage(lstMaterials.hwnd, LB_SETTABSTOPS, 3, aTabs(0)) lstMaterials.Clear Do Until oRS.EOF With lstMaterials If txtPreOrder = "Z" Or txtPreOrder = "P" Then ' strLine = Field2Str2(oRS!Item_ID) & vbTab & Field2Str(oRS!inv_no) & vbTab & oRS!Desc & vbTab & oRS!o_qty strLine = vbTab & Field2Str(oRS!inv_no) & vbTab & oRS!Desc & vbTab & oRS!o_qty ' strLine = strLine & vbTab & oRS!a_qty .AddItem strLine Else strLine = Field2Str2(oRS!Item_ID) & vbTab & Field2Str(oRS!inv_no) & vbTab & oRS!Desc & vbTab & oRS!o_qty strLine = strLine & vbTab & oRS!a_qty .AddItem strLine dblSUM = (Field2Str2(oRS!a_qty) * Field2Str2(oRS!price)) End If End With ' dblSUM = (Field2Str2(oRS!a_qty) * Field2Str2(oRS!price)) mdblTOTAL = mdblTOTAL + dblSUM oRS.MoveNext Loop oRS.Close lblTotal = Format(mdblTOTAL, "#,#.00") Exit Sub Error_EH: gstrMODULE = "Form ShowOrderMat - Module OrderMatLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub Form_Load() txtPreOrder = frmLotList.txtPreOrder Call OrderMatLoad End Sub