VERSION 5.00 Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX" Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "Crystl32.OCX" Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx" Begin VB.Form frmTake Caption = "Takeoff Information" ClientHeight = 8580 ClientLeft = 165 ClientTop = 465 ClientWidth = 11880 KeyPreview = -1 'True LinkTopic = "Form1" ScaleHeight = 8580 ScaleWidth = 11880 StartUpPosition = 3 'Windows Default Begin VB.CheckBox chkUpdate Alignment = 1 'Right Justify Caption = "Update:" Height = 360 Left = 375 TabIndex = 257 Top = 1050 Width = 930 End Begin VB.TextBox txtInvType Height = 285 Left = 11520 TabIndex = 255 Top = 600 Visible = 0 'False Width = 255 End Begin VB.CommandButton cmdPrintAllIncrease Caption = "Print All Increases" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Left = 10620 TabIndex = 252 Top = 1620 Width = 1155 End Begin VB.CommandButton cmdPrintIncrease Caption = "Print 1 Increase" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 615 Left = 10620 TabIndex = 251 Top = 1020 Width = 1155 End Begin VB.TextBox txt108 Height = 315 Left = 10980 TabIndex = 244 Top = 2520 Width = 855 End Begin VB.TextBox txt68 Height = 315 Left = 9060 TabIndex = 241 Top = 2520 Width = 855 End Begin VB.CheckBox chk2Story Caption = "Two Story" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 8580 TabIndex = 239 Top = 1980 Width = 1515 End Begin VB.CheckBox chkOpen Alignment = 1 'Right Justify Caption = "Remove Openings From Order Materials:" Height = 195 Left = 420 TabIndex = 234 Top = 0 Width = 3195 End Begin VB.CommandButton cmdMove Caption = "Copy to New Project" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 6660 TabIndex = 222 Top = 3060 Width = 1275 End Begin VB.CommandButton cmdDefaultMat Caption = "De&Fault Materials" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 60 TabIndex = 217 TabStop = 0 'False Top = 1440 Width = 1275 End Begin VB.CommandButton cmdPrintAllTake Caption = "Print &All Takeoffs" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 10605 TabIndex = 206 TabStop = 0 'False Top = 3060 Width = 1275 End Begin Crystal.CrystalReport crTake Left = 3030 Top = 555 _ExtentX = 741 _ExtentY = 741 _Version = 348160 PrintFileLinesPerPage= 60 End Begin VB.CommandButton cmdPrintTake Caption = "Print &1 Takeoff" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 9300 TabIndex = 197 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.CommandButton cmdCopy Caption = "&Copy Takeoff" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 5340 TabIndex = 196 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.TextBox txtProject Enabled = 0 'False Height = 285 Left = 720 TabIndex = 192 TabStop = 0 'False Top = 240 Width = 2895 End Begin VB.TextBox txtFinish BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 4620 TabIndex = 191 TabStop = 0 'False Top = 600 Width = 2115 End Begin VB.CommandButton cmdDeleteTakeoff Caption = "&Delete Takeoff" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 7980 TabIndex = 190 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.CommandButton cmdSave Caption = "Sa&Ve Takeoff" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 1380 TabIndex = 149 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.TextBox txtNewElv Height = 315 Left = 4800 MaxLength = 8 TabIndex = 9 Top = 1020 Visible = 0 'False Width = 1395 End Begin VB.CommandButton cmdNew Caption = "&New Takeoff" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 4020 TabIndex = 146 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.CommandButton cmdExit Caption = "&Exit" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 2700 TabIndex = 145 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.CommandButton cmdUPInvPrices Caption = "Update Inv. Prices" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 60 TabIndex = 144 TabStop = 0 'False Top = 3060 Width = 1275 End Begin VB.CommandButton cmdUPLabRates Caption = "&Update Labor Rates" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 60 TabIndex = 143 TabStop = 0 'False Top = 2520 Width = 1275 End Begin VB.CommandButton cmdChgLabRates Caption = "Chan&Ge Labor Rates" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 60 TabIndex = 142 TabStop = 0 'False Top = 1980 Width = 1275 End Begin VB.TextBox txtNotes Height = 1335 Left = 2880 MultiLine = -1 'True TabIndex = 11 Top = 1620 Width = 4875 End Begin VB.ComboBox cboOneKote Height = 315 ItemData = "frmTake.frx":0000 Left = 8520 List = "frmTake.frx":0002 Style = 2 'Dropdown List TabIndex = 10 Top = 600 Width = 2955 End Begin VB.TextBox txtStuccoYds Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 8880 TabIndex = 8 TabStop = 0 'False Top = 180 Width = 1035 End Begin VB.TextBox txtLathYds Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 6660 TabIndex = 6 TabStop = 0 'False Top = 180 Width = 1035 End Begin VB.TextBox txtTTLYds Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 4620 TabIndex = 3 TabStop = 0 'False Top = 180 Width = 1035 End Begin TabDlg.SSTab tabTake Height = 4875 Left = 180 TabIndex = 2 TabStop = 0 'False Top = 3660 Width = 11475 _ExtentX = 20241 _ExtentY = 8599 _Version = 393216 Tabs = 4 Tab = 2 TabsPerRow = 4 TabHeight = 520 BackColor = -2147483644 TabCaption(0) = "Mea&Surements" TabPicture(0) = "frmTake.frx":0004 Tab(0).ControlEnabled= 0 'False Tab(0).Control(0)= "lblMeDesc" Tab(0).Control(1)= "lblMeSqFt" Tab(0).Control(2)= "lblMeLocate" Tab(0).Control(3)= "lblMeType" Tab(0).Control(4)= "fraYardage" Tab(0).Control(5)= "cmdAddMeas" Tab(0).Control(6)= "cmdDelMeas" Tab(0).Control(6).Enabled= 0 'False Tab(0).Control(7)= "cmdSaveMeas" Tab(0).Control(8)= "cmdUpMeasCalc" Tab(0).Control(8).Enabled= 0 'False Tab(0).Control(9)= "lstMeasure" Tab(0).Control(9).Enabled= 0 'False Tab(0).Control(10)= "txtMeDesc" Tab(0).Control(11)= "txtMeSqFt" Tab(0).Control(12)= "cboMeLocate" Tab(0).Control(13)= "txtMeType" Tab(0).ControlCount= 14 TabCaption(1) = "Ma&Terials" TabPicture(1) = "frmTake.frx":0020 Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "lstMInventory" Tab(1).Control(1)= "cmdUpdate" Tab(1).Control(2)= "fraMaterials" Tab(1).Control(3)= "cmdDel1900" Tab(1).Control(4)= "chkCalc" Tab(1).Control(4).Enabled= 0 'False Tab(1).Control(5)= "cmdSetup" Tab(1).Control(5).Enabled= 0 'False Tab(1).Control(6)= "chkTransfer" Tab(1).Control(6).Enabled= 0 'False Tab(1).Control(7)= "cmdFindMat" Tab(1).Control(8)= "cmdAddMat" Tab(1).Control(8).Enabled= 0 'False Tab(1).Control(9)= "cboMetal" Tab(1).Control(10)= "cboMType" Tab(1).Control(11)= "cboDFlag" Tab(1).Control(12)= "txtMetLength" Tab(1).Control(13)= "txtMatPrice" Tab(1).Control(14)= "txtMatQty" Tab(1).Control(15)= "txtMatDesc" Tab(1).Control(16)= "txtMatInvNo" Tab(1).Control(17)= "lstTOMatrl" Tab(1).Control(17).Enabled= 0 'False Tab(1).Control(18)= "cmdSaveMat" Tab(1).Control(19)= "cmdDelMat" Tab(1).Control(19).Enabled= 0 'False Tab(1).Control(20)= "lblMatDesc" Tab(1).Control(21)= "lblMetLength" Tab(1).Control(22)= "lblMetal" Tab(1).Control(23)= "lblMType" Tab(1).Control(24)= "lblDFlag" Tab(1).Control(25)= "lblMatPrice" Tab(1).Control(26)= "lblMatQty" Tab(1).Control(27)= "lblInvno" Tab(1).ControlCount= 28 TabCaption(2) = "&Options" TabPicture(2) = "frmTake.frx":003C Tab(2).ControlEnabled= -1 'True Tab(2).Control(0)= "lblYrdge" Tab(2).Control(0).Enabled= 0 'False Tab(2).Control(1)= "lblBAmt" Tab(2).Control(1).Enabled= 0 'False Tab(2).Control(2)= "lblOTexture" Tab(2).Control(2).Enabled= 0 'False Tab(2).Control(3)= "lblOFin2" Tab(2).Control(3).Enabled= 0 'False Tab(2).Control(4)= "lblOFadj" Tab(2).Control(4).Enabled= 0 'False Tab(2).Control(5)= "lblOMInvNo" Tab(2).Control(5).Enabled= 0 'False Tab(2).Control(6)= "lblOMDesc" Tab(2).Control(6).Enabled= 0 'False Tab(2).Control(7)= "lblOMQty" Tab(2).Control(7).Enabled= 0 'False Tab(2).Control(8)= "lblOMPrice" Tab(2).Control(8).Enabled= 0 'False Tab(2).Control(9)= "lblOMDFlag" Tab(2).Control(9).Enabled= 0 'False Tab(2).Control(10)= "lblOMMType" Tab(2).Control(10).Enabled= 0 'False Tab(2).Control(11)= "lblOMCFlag" Tab(2).Control(11).Enabled= 0 'False Tab(2).Control(12)= "lblOMMLength" Tab(2).Control(12).Enabled= 0 'False Tab(2).Control(13)= "lblOStone" Tab(2).Control(13).Enabled= 0 'False Tab(2).Control(14)= "lblOScaffold" Tab(2).Control(14).Enabled= 0 'False Tab(2).Control(15)= "Scaf6" Tab(2).Control(15).Enabled= 0 'False Tab(2).Control(16)= "lblScaf10" Tab(2).Control(16).Enabled= 0 'False Tab(2).Control(17)= "lblOptNum" Tab(2).Control(17).Enabled= 0 'False Tab(2).Control(18)= "lstOptions" Tab(2).Control(18).Enabled= 0 'False Tab(2).Control(19)= "txtODesc" Tab(2).Control(19).Enabled= 0 'False Tab(2).Control(20)= "txtOYdge" Tab(2).Control(20).Enabled= 0 'False Tab(2).Control(21)= "txtOBAmt" Tab(2).Control(21).Enabled= 0 'False Tab(2).Control(22)= "cboOFinish" Tab(2).Control(22).Enabled= 0 'False Tab(2).Control(23)= "txtOFin2" Tab(2).Control(23).Enabled= 0 'False Tab(2).Control(24)= "txtOFAdj" Tab(2).Control(24).Enabled= 0 'False Tab(2).Control(25)= "lstOptMatrl" Tab(2).Control(25).Enabled= 0 'False Tab(2).Control(26)= "cmdAddOpt" Tab(2).Control(26).Enabled= 0 'False Tab(2).Control(27)= "cmdDelOpt" Tab(2).Control(27).Enabled= 0 'False Tab(2).Control(28)= "cmdAddOptMat" Tab(2).Control(28).Enabled= 0 'False Tab(2).Control(29)= "cmdDelOptMat" Tab(2).Control(29).Enabled= 0 'False Tab(2).Control(30)= "txtOMInvNo" Tab(2).Control(30).Enabled= 0 'False Tab(2).Control(31)= "txtOMDesc" Tab(2).Control(31).Enabled= 0 'False Tab(2).Control(32)= "txtOMQty" Tab(2).Control(32).Enabled= 0 'False Tab(2).Control(33)= "txtOMPrice" Tab(2).Control(33).Enabled= 0 'False Tab(2).Control(34)= "txtOMMetL" Tab(2).Control(34).Enabled= 0 'False Tab(2).Control(35)= "cboOMDFlag" Tab(2).Control(35).Enabled= 0 'False Tab(2).Control(36)= "cboOMType" Tab(2).Control(36).Enabled= 0 'False Tab(2).Control(37)= "cboOMMetal" Tab(2).Control(37).Enabled= 0 'False Tab(2).Control(38)= "cmdFindOptMat" Tab(2).Control(38).Enabled= 0 'False Tab(2).Control(39)= "lstInventory" Tab(2).Control(39).Enabled= 0 'False Tab(2).Control(40)= "cmdSaveOpt" Tab(2).Control(40).Enabled= 0 'False Tab(2).Control(41)= "cmdSaveOptMat" Tab(2).Control(41).Enabled= 0 'False Tab(2).Control(42)= "cmdCopyOpt" Tab(2).Control(42).Enabled= 0 'False Tab(2).Control(43)= "txtNote" Tab(2).Control(43).Enabled= 0 'False Tab(2).Control(44)= "chkOStone" Tab(2).Control(44).Enabled= 0 'False Tab(2).Control(45)= "txtOST_SqFt" Tab(2).Control(45).Enabled= 0 'False Tab(2).Control(46)= "chkST_Others" Tab(2).Control(46).Enabled= 0 'False Tab(2).Control(47)= "chkNoInvoice" Tab(2).Control(47).Enabled= 0 'False Tab(2).Control(48)= "txtO68" Tab(2).Control(48).Enabled= 0 'False Tab(2).Control(49)= "txtO108" Tab(2).Control(49).Enabled= 0 'False Tab(2).ControlCount= 50 TabCaption(3) = "&Prices" TabPicture(3) = "frmTake.frx":0058 Tab(3).ControlEnabled= 0 'False Tab(3).Control(0)= "txtSS" Tab(3).Control(1)= "txtMFPr" Tab(3).Control(2)= "txtSBPr" Tab(3).Control(2).Enabled= 0 'False Tab(3).Control(3)= "txtMatMURate" Tab(3).Control(3).Enabled= 0 'False Tab(3).Control(4)= "txtDFPr" Tab(3).Control(4).Enabled= 0 'False Tab(3).Control(5)= "cmdCalcOptTexture" Tab(3).Control(5).Enabled= 0 'False Tab(3).Control(6)= "cmdCalcPrimary" Tab(3).Control(6).Enabled= 0 'False Tab(3).Control(7)= "txtQUPr" Tab(3).Control(7).Enabled= 0 'False Tab(3).Control(8)= "txtMonterreyPr" Tab(3).Control(8).Enabled= 0 'False Tab(3).Control(9)= "txtSmoothPr" Tab(3).Control(9).Enabled= 0 'False Tab(3).Control(10)= "txtDashPr" Tab(3).Control(10).Enabled= 0 'False Tab(3).Control(11)= "txtSkipPr" Tab(3).Control(11).Enabled= 0 'False Tab(3).Control(12)= "txtSandPr" Tab(3).Control(12).Enabled= 0 'False Tab(3).Control(13)= "fraSecond" Tab(3).Control(14)= "fraPrimary" Tab(3).Control(15)= "txtPrSQYD" Tab(3).Control(15).Enabled= 0 'False Tab(3).Control(16)= "txtCMUPrice" Tab(3).Control(17)= "txtCMURate" Tab(3).Control(17).Enabled= 0 'False Tab(3).Control(18)= "txtBidPrwCMU" Tab(3).Control(19)= "txtBidPrice" Tab(3).Control(19).Enabled= 0 'False Tab(3).Control(20)= "txtOHRate" Tab(3).Control(20).Enabled= 0 'False Tab(3).Control(21)= "txtOH" Tab(3).Control(21).Enabled= 0 'False Tab(3).Control(22)= "txtTtlMU" Tab(3).Control(22).Enabled= 0 'False Tab(3).Control(23)= "txtMURate" Tab(3).Control(23).Enabled= 0 'False Tab(3).Control(24)= "txtTtlCost" Tab(3).Control(24).Enabled= 0 'False Tab(3).Control(25)= "txtLabBur" Tab(3).Control(25).Enabled= 0 'False Tab(3).Control(26)= "txtMatMU" Tab(3).Control(26).Enabled= 0 'False Tab(3).Control(27)= "txtMisc" Tab(3).Control(28)= "txtTtlMat" Tab(3).Control(28).Enabled= 0 'False Tab(3).Control(29)= "txtTape" Tab(3).Control(29).Enabled= 0 'False Tab(3).Control(30)= "txtTPRate" Tab(3).Control(30).Enabled= 0 'False Tab(3).Control(31)= "txtScafGas" Tab(3).Control(31).Enabled= 0 'False Tab(3).Control(32)= "txtSGRate" Tab(3).Control(32).Enabled= 0 'False Tab(3).Control(33)= "txtMetalFt" Tab(3).Control(33).Enabled= 0 'False Tab(3).Control(34)= "txtMetLab" Tab(3).Control(34).Enabled= 0 'False Tab(3).Control(35)= "txtMLRate" Tab(3).Control(35).Enabled= 0 'False Tab(3).Control(36)= "txtLathLab" Tab(3).Control(36).Enabled= 0 'False Tab(3).Control(37)= "txtLLRate" Tab(3).Control(37).Enabled= 0 'False Tab(3).Control(38)= "txtStucLab" Tab(3).Control(38).Enabled= 0 'False Tab(3).Control(39)= "txtSLRate" Tab(3).Control(39).Enabled= 0 'False Tab(3).Control(40)= "txtSandAmt" Tab(3).Control(40).Enabled= 0 'False Tab(3).Control(41)= "txtSandPrice" Tab(3).Control(42)= "txtSandTons" Tab(3).Control(42).Enabled= 0 'False Tab(3).Control(43)= "lbl2S" Tab(3).Control(44)= "lblSS" Tab(3).Control(45)= "lblMF" Tab(3).Control(46)= "lblSYN" Tab(3).Control(47)= "lblFS3" Tab(3).Control(48)= "lblFS2" Tab(3).Control(49)= "lblDF" Tab(3).Control(50)= "lblOptTextures" Tab(3).Control(51)= "lblPrimary" Tab(3).Control(52)= "lblFQuern" Tab(3).Control(53)= "lblFMont" Tab(3).Control(54)= "lblFSmooth" Tab(3).Control(55)= "lblFDash" Tab(3).Control(56)= "lblFSkip" Tab(3).Control(57)= "lblFSand" Tab(3).Control(58)= "Line4" Tab(3).Control(59)= "lblBurDesc" Tab(3).Control(60)= "Line3" Tab(3).Control(61)= "lblSQYDPR" Tab(3).Control(62)= "lblCMUPr" Tab(3).Control(63)= "lblBidwCMU" Tab(3).Control(64)= "lblBidPrice" Tab(3).Control(65)= "Line2" Tab(3).Control(66)= "Line1" Tab(3).Control(67)= "lblOH" Tab(3).Control(68)= "lblMarkup" Tab(3).Control(69)= "lblTtlCost" Tab(3).Control(70)= "lblLaborBurden" Tab(3).Control(71)= "lblMatMU" Tab(3).Control(72)= "lblTtlMat" Tab(3).Control(73)= "lblMisc" Tab(3).Control(74)= "lblTape" Tab(3).Control(75)= "lblScaf" Tab(3).Control(76)= "lblMetLab" Tab(3).Control(77)= "lblLathLab" Tab(3).Control(78)= "lblStucLab" Tab(3).Control(79)= "lblX2" Tab(3).Control(80)= "lblX1" Tab(3).Control(81)= "lblSand" Tab(3).ControlCount= 82 Begin LpLib.fpList lstMInventory Height = 2010 Left = -66870 TabIndex = 260 Top = 1260 Width = 3240 _Version = 196608 _ExtentX = 5715 _ExtentY = 3545 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 = -1 'True BackColor = -2147483643 ForeColor = -2147483640 Columns = 2 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 = "frmTake.frx":0074 End Begin VB.TextBox txtO108 Height = 315 Left = 8340 TabIndex = 249 Top = 2280 Width = 675 End Begin VB.TextBox txtO68 Height = 315 Left = 8340 TabIndex = 248 Top = 1860 Width = 675 End Begin VB.TextBox txtSS BackColor = &H0080FFFF& Height = 285 Left = -65700 TabIndex = 238 Top = 4200 Width = 1155 End Begin VB.CheckBox chkNoInvoice Alignment = 1 'Right Justify Caption = "No Invoice" Height = 195 Left = 3600 TabIndex = 34 ToolTipText = "This Option Will Not Print On Invoice." Top = 1260 Width = 1275 End Begin VB.CheckBox chkST_Others Alignment = 1 'Right Justify Caption = "Stone by Others" Height = 195 Left = 5040 TabIndex = 33 Top = 1260 Width = 1515 End Begin VB.TextBox txtOST_SqFt Alignment = 1 'Right Justify Height = 315 Left = 10335 TabIndex = 31 Top = 1185 Width = 915 End Begin VB.CheckBox chkOStone Alignment = 1 'Right Justify Caption = "Stone Veneer Option:" Height = 270 Left = 6720 TabIndex = 32 Top = 1200 Width = 1905 End Begin VB.TextBox txtMFPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 226 Top = 3900 Width = 1155 End Begin VB.TextBox txtNote Height = 975 Left = 240 MultiLine = -1 'True TabIndex = 36 Top = 2700 Width = 5475 End Begin VB.CommandButton cmdUpdate Caption = "Update &Materials On" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -67260 TabIndex = 221 Top = 3720 Width = 1695 End Begin VB.Frame fraMaterials BorderStyle = 0 'None Height = 435 Left = -66780 TabIndex = 218 Top = 3240 Width = 2955 Begin VB.OptionButton optInv Caption = "Custom Inv." Height = 195 Index = 1 Left = 1560 TabIndex = 220 Top = 120 Value = -1 'True Width = 1275 End Begin VB.OptionButton optInv Caption = "Full Inv." Height = 195 Index = 0 Left = 120 TabIndex = 219 Top = 120 Width = 1215 End End Begin VB.TextBox txtSBPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 216 TabStop = 0 'False Top = 3600 Width = 1155 End Begin VB.CommandButton cmdDel1900 Caption = "Delete 19XX Inventory" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -65400 TabIndex = 212 Top = 3720 Width = 1695 End Begin VB.CheckBox chkCalc Caption = "Calculated" Height = 255 Left = -64980 TabIndex = 207 TabStop = 0 'False Top = 345 Width = 1335 End Begin VB.CommandButton cmdSetup Caption = "Setup Materials &On" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -69120 TabIndex = 198 TabStop = 0 'False Top = 3720 Width = 1695 End Begin VB.TextBox txtMatMURate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -73200 TabIndex = 195 TabStop = 0 'False Top = 3300 Width = 615 End Begin VB.CommandButton cmdCopyOpt Caption = "Copy Option" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 5640 TabIndex = 194 TabStop = 0 'False Top = 2130 Width = 1695 End Begin VB.CommandButton cmdSaveOptMat Caption = "&Save Option Material" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 9600 TabIndex = 46 Top = 2640 Width = 1695 End Begin VB.CommandButton cmdSaveOpt Caption = "&Save Option" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 5640 TabIndex = 35 Top = 1575 Width = 1695 End Begin VB.ListBox lstInventory Height = 1815 Left = 240 Sorted = -1 'True TabIndex = 193 TabStop = 0 'False Top = 660 Visible = 0 'False Width = 3195 End Begin VB.CheckBox chkTransfer Caption = "No Transfer" Height = 240 Left = -64980 TabIndex = 180 TabStop = 0 'False Top = 570 Width = 1215 End Begin VB.CommandButton cmdFindOptMat Height = 435 Left = 9045 Picture = "frmTake.frx":0354 Style = 1 'Graphical TabIndex = 38 Top = 2310 Width = 435 End Begin VB.CommandButton cmdFindMat Height = 435 Left = -65475 Picture = "frmTake.frx":0796 Style = 1 'Graphical TabIndex = 171 Top = 465 Width = 435 End Begin VB.ComboBox cboOMMetal Height = 315 ItemData = "frmTake.frx":0BD8 Left = 9600 List = "frmTake.frx":0BE2 Style = 2 'Dropdown List TabIndex = 44 Top = 3930 Width = 1275 End Begin VB.ComboBox cboOMType Height = 315 ItemData = "frmTake.frx":0BF3 Left = 9600 List = "frmTake.frx":0BF5 Style = 2 'Dropdown List TabIndex = 43 Top = 3540 Width = 1275 End Begin VB.ComboBox cboOMDFlag Height = 315 ItemData = "frmTake.frx":0BF7 Left = 6840 List = "frmTake.frx":0C01 Style = 2 'Dropdown List TabIndex = 42 Top = 4320 Width = 1155 End Begin VB.TextBox txtOMMetL Alignment = 1 'Right Justify Height = 315 Left = 9600 MaxLength = 4 TabIndex = 45 Top = 4320 Width = 915 End Begin VB.TextBox txtOMPrice Alignment = 1 'Right Justify Height = 315 Left = 6840 MaxLength = 6 TabIndex = 41 Top = 3930 Width = 915 End Begin VB.TextBox txtOMQty Alignment = 1 'Right Justify Height = 315 Left = 6840 MaxLength = 4 TabIndex = 40 Top = 3540 Width = 915 End Begin VB.TextBox txtOMDesc Height = 315 Left = 6840 MaxLength = 50 TabIndex = 39 Top = 3165 Width = 4275 End Begin VB.TextBox txtOMInvNo Alignment = 1 'Right Justify Height = 315 Left = 6840 MaxLength = 18 TabIndex = 37 Top = 2760 Width = 2625 End Begin VB.CommandButton cmdAddMat Caption = "Add Material" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -69120 TabIndex = 181 TabStop = 0 'False Top = 4260 Width = 1695 End Begin VB.ComboBox cboMetal Height = 315 ItemData = "frmTake.frx":0C15 Left = -68100 List = "frmTake.frx":0C1F Style = 2 'Dropdown List TabIndex = 177 Top = 2640 Width = 1155 End Begin VB.ComboBox cboMType Height = 315 ItemData = "frmTake.frx":0C30 Left = -68100 List = "frmTake.frx":0C32 Style = 2 'Dropdown List TabIndex = 176 Top = 2280 Width = 1155 End Begin VB.ComboBox cboDFlag Height = 315 ItemData = "frmTake.frx":0C34 Left = -68100 List = "frmTake.frx":0C3E Style = 2 'Dropdown List TabIndex = 175 Top = 1920 Width = 1155 End Begin VB.TextBox txtMetLength Alignment = 1 'Right Justify Height = 315 Left = -68100 MaxLength = 4 TabIndex = 178 Top = 3000 Width = 915 End Begin VB.TextBox txtMatPrice Alignment = 1 'Right Justify BeginProperty DataFormat Type = 1 Format = "#,##0.00" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 1 EndProperty Height = 315 Left = -68100 MaxLength = 6 TabIndex = 174 Top = 1560 Width = 915 End Begin VB.TextBox txtMatQty Alignment = 1 'Right Justify BeginProperty DataFormat Type = 1 Format = "#,##0" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 1 EndProperty Height = 315 Left = -68100 MaxLength = 4 TabIndex = 173 Top = 1200 Width = 915 End Begin VB.TextBox txtMatDesc BackColor = &H00FFFFFF& Height = 315 Left = -68100 MaxLength = 50 TabIndex = 172 Top = 885 Width = 4275 End Begin VB.TextBox txtMatInvNo BackColor = &H00FFFFFF& Height = 315 Left = -68100 MaxLength = 18 TabIndex = 170 Top = 555 Width = 2625 End Begin VB.ListBox lstTOMatrl Height = 4155 Left = -74820 TabIndex = 160 TabStop = 0 'False Top = 480 Width = 5535 End Begin VB.TextBox txtMeType Height = 315 Left = -65520 MaxLength = 1 TabIndex = 158 Top = 1080 Width = 915 End Begin VB.ComboBox cboMeLocate Height = 315 ItemData = "frmTake.frx":0C52 Left = -69720 List = "frmTake.frx":0C54 Style = 2 'Dropdown List TabIndex = 157 Top = 1080 Width = 2235 End Begin VB.TextBox txtMeSqFt Alignment = 1 'Right Justify BeginProperty DataFormat Type = 1 Format = "#,##0" HaveTrueFalseNull= 0 FirstDayOfWeek = 0 FirstWeekOfYear = 0 LCID = 1033 SubFormatType = 1 EndProperty Height = 315 Left = -65520 MaxLength = 8 TabIndex = 156 Top = 600 Width = 915 End Begin VB.TextBox txtMeDesc Height = 315 Left = -70380 MaxLength = 30 TabIndex = 155 Top = 600 Width = 2835 End Begin VB.ListBox lstMeasure Height = 2205 Left = -74760 TabIndex = 150 TabStop = 0 'False Top = 600 Width = 3135 End Begin VB.CommandButton cmdUpMeasCalc Caption = "Update Takeoff Yardage" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -72540 TabIndex = 148 TabStop = 0 'False Top = 2940 Width = 1935 End Begin VB.CommandButton cmdSaveMeas Caption = "Save Measurement" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -74760 TabIndex = 159 Top = 3540 Width = 2115 End Begin VB.CommandButton cmdDelMeas Caption = "Delete Measurement" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -74760 TabIndex = 141 TabStop = 0 'False Top = 4140 Width = 2115 End Begin VB.CommandButton cmdAddMeas Caption = "Add Measurement" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -74760 TabIndex = 161 Top = 2940 Width = 2115 End Begin VB.TextBox txtDFPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 140 TabStop = 0 'False Top = 3300 Width = 1155 End Begin VB.CommandButton cmdSaveMat Caption = "Save Material" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -67260 TabIndex = 179 Top = 4260 Width = 1695 End Begin VB.CommandButton cmdDelMat Caption = "Delete Material" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -65400 TabIndex = 136 TabStop = 0 'False Top = 4260 Width = 1695 End Begin VB.CommandButton cmdCalcOptTexture Caption = "Clear Optional Te&Xtures" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = -70080 TabIndex = 135 TabStop = 0 'False Top = 4020 Width = 1215 End Begin VB.CommandButton cmdCalcPrimary Caption = "Calculate Primar&Y Texture" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 735 Left = -71460 TabIndex = 134 TabStop = 0 'False Top = 4020 Width = 1215 End Begin VB.TextBox txtQUPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 133 TabStop = 0 'False Top = 3000 Width = 1155 End Begin VB.TextBox txtMonterreyPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 132 TabStop = 0 'False Top = 2700 Width = 1155 End Begin VB.TextBox txtSmoothPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 131 TabStop = 0 'False Top = 2400 Width = 1155 End Begin VB.TextBox txtDashPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 130 TabStop = 0 'False Top = 2100 Width = 1155 End Begin VB.TextBox txtSkipPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 285 Left = -65700 TabIndex = 129 TabStop = 0 'False Top = 1800 Width = 1155 End Begin VB.TextBox txtSandPr Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -65700 TabIndex = 128 TabStop = 0 'False Top = 900 Visible = 0 'False Width = 1155 End Begin VB.Frame fraSecond Height = 3735 Left = -66240 TabIndex = 121 Top = 840 Width = 495 Begin VB.CheckBox chkSS Caption = "Check1" Height = 195 Left = 150 TabIndex = 237 Top = 3420 Width = 195 End Begin VB.CheckBox chkMF Caption = "Check1" Height = 255 Left = 150 TabIndex = 225 Top = 3060 Width = 195 End Begin VB.CheckBox chkSB Caption = "Check1" Height = 255 Left = 150 TabIndex = 215 TabStop = 0 'False Top = 2760 Width = 195 End Begin VB.CheckBox chkDF Caption = "Check1" Height = 255 Left = 150 TabIndex = 139 TabStop = 0 'False Top = 2460 Width = 195 End Begin VB.CheckBox chkQU Caption = "Check6" Height = 195 Left = 150 TabIndex = 127 TabStop = 0 'False Top = 2220 Width = 195 End Begin VB.CheckBox chkMonterrey Caption = "Check5" Height = 195 Left = 150 TabIndex = 126 TabStop = 0 'False Top = 1920 Width = 195 End Begin VB.CheckBox chkSmooth Caption = "Check4" Height = 195 Left = 150 TabIndex = 125 TabStop = 0 'False Top = 1620 Width = 195 End Begin VB.CheckBox chkDash Caption = "Check3" Height = 195 Left = 150 TabIndex = 124 TabStop = 0 'False Top = 1320 Width = 195 End Begin VB.CheckBox chkSkip Caption = "Check2" Height = 255 Left = 150 TabIndex = 123 TabStop = 0 'False Top = 960 Width = 195 End Begin VB.CheckBox chkSand Caption = "Check1" Height = 195 Left = 150 TabIndex = 122 TabStop = 0 'False Top = 180 Width = 195 End End Begin VB.Frame fraPrimary Height = 3735 Left = -67020 TabIndex = 112 Top = 840 Width = 495 Begin VB.OptionButton optPTex Height = 255 Index = 11 Left = 150 TabIndex = 235 Top = 3360 Width = 195 End Begin VB.OptionButton optPTex Height = 255 Index = 10 Left = 150 TabIndex = 223 Top = 3060 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 9 Left = 150 TabIndex = 213 TabStop = 0 'False Top = 2820 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 2 Left = 150 TabIndex = 211 TabStop = 0 'False Top = 780 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 1 Left = 150 TabIndex = 210 TabStop = 0 'False Top = 480 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 8 Left = 150 TabIndex = 138 TabStop = 0 'False Top = 2520 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 7 Left = 150 TabIndex = 119 TabStop = 0 'False Top = 2220 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 6 Left = 150 TabIndex = 118 TabStop = 0 'False Top = 1920 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 5 Left = 150 TabIndex = 117 TabStop = 0 'False Top = 1620 Value = -1 'True Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 4 Left = 150 TabIndex = 116 TabStop = 0 'False Top = 1320 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 3 Left = 150 TabIndex = 115 TabStop = 0 'False Top = 1020 Width = 195 End Begin VB.OptionButton optPTex Height = 195 Index = 0 Left = 150 TabIndex = 114 TabStop = 0 'False Top = 200 Width = 195 End End Begin VB.TextBox txtPrSQYD Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -69600 TabIndex = 105 TabStop = 0 'False Top = 3360 Width = 855 End Begin VB.TextBox txtCMUPrice Alignment = 1 'Right Justify BackColor = &H00FFFF80& Enabled = 0 'False Height = 315 Left = -69600 MaxLength = 6 TabIndex = 64 Top = 3000 Width = 855 End Begin VB.TextBox txtCMURate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -70440 TabIndex = 103 TabStop = 0 'False Top = 3000 Width = 615 End Begin VB.TextBox txtBidPrwCMU Alignment = 1 'Right Justify BackColor = &H00FFFF80& Enabled = 0 'False Height = 375 Left = -69900 MaxLength = 8 TabIndex = 63 Top = 2220 Width = 1155 End Begin VB.TextBox txtBidPrice Alignment = 1 'Right Justify BackColor = &H00FFFF80& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 420 Left = -69900 TabIndex = 65 TabStop = 0 'False Top = 1680 Width = 1155 End Begin VB.TextBox txtOHRate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -70440 TabIndex = 102 TabStop = 0 'False Top = 1140 Width = 615 End Begin VB.TextBox txtOH Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -69600 TabIndex = 101 TabStop = 0 'False Top = 1140 Width = 855 End Begin VB.TextBox txtTtlMU Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -69600 TabIndex = 100 TabStop = 0 'False Top = 780 Width = 855 End Begin VB.TextBox txtMURate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -70440 TabIndex = 99 TabStop = 0 'False Top = 780 Width = 615 End Begin VB.TextBox txtTtlCost Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -69600 TabIndex = 98 TabStop = 0 'False Top = 420 Width = 855 End Begin VB.TextBox txtLabBur Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 90 TabStop = 0 'False Top = 3660 Width = 825 End Begin VB.TextBox txtMatMU Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 88 TabStop = 0 'False Top = 3300 Width = 825 End Begin VB.TextBox txtMisc Alignment = 1 'Right Justify Height = 315 Left = -72360 MaxLength = 6 TabIndex = 62 Top = 2580 Width = 825 End Begin VB.TextBox txtTtlMat Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 85 TabStop = 0 'False Top = 2940 Width = 825 End Begin VB.TextBox txtTape Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 84 TabStop = 0 'False Top = 2220 Width = 825 End Begin VB.TextBox txtTPRate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -73200 TabIndex = 83 TabStop = 0 'False Top = 2220 Width = 615 End Begin VB.TextBox txtScafGas Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 82 TabStop = 0 'False Top = 1860 Width = 825 End Begin VB.TextBox txtSGRate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -73200 TabIndex = 81 TabStop = 0 'False Top = 1860 Width = 615 End Begin VB.TextBox txtMetalFt Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -74880 TabIndex = 80 TabStop = 0 'False Top = 1500 Width = 735 End Begin VB.TextBox txtMetLab Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 79 TabStop = 0 'False Top = 1500 Width = 825 End Begin VB.TextBox txtMLRate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -73200 TabIndex = 78 TabStop = 0 'False Top = 1500 Width = 615 End Begin VB.TextBox txtLathLab Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 77 TabStop = 0 'False Top = 1140 Width = 825 End Begin VB.TextBox txtLLRate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -73200 TabIndex = 76 TabStop = 0 'False Top = 1140 Width = 615 End Begin VB.TextBox txtStucLab Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 75 TabStop = 0 'False Top = 780 Width = 825 End Begin VB.TextBox txtSLRate Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -73200 TabIndex = 74 TabStop = 0 'False Top = 780 Width = 615 End Begin VB.TextBox txtSandAmt Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -72360 TabIndex = 67 TabStop = 0 'False Top = 420 Width = 825 End Begin VB.TextBox txtSandPrice Alignment = 1 'Right Justify Height = 315 Left = -73200 MaxLength = 6 TabIndex = 61 Top = 420 Width = 615 End Begin VB.TextBox txtSandTons Alignment = 1 'Right Justify BackColor = &H0080FFFF& Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = -74100 TabIndex = 59 TabStop = 0 'False Top = 420 Width = 555 End Begin VB.CommandButton cmdDelOptMat Caption = "&Delete Option Material" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 9600 TabIndex = 57 TabStop = 0 'False Top = 2130 Width = 1695 End Begin VB.CommandButton cmdAddOptMat Caption = "Add Option &Material" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 9600 TabIndex = 56 TabStop = 0 'False Top = 1575 Width = 1695 End Begin VB.CommandButton cmdDelOpt Caption = "&Delete Option" Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 3660 TabIndex = 55 TabStop = 0 'False Top = 2130 Width = 1695 End Begin VB.CommandButton cmdAddOpt Caption = "&Add Option" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 510 Left = 3660 TabIndex = 54 TabStop = 0 'False Top = 1575 Width = 1695 End Begin VB.ListBox lstOptMatrl Height = 840 Left = 240 TabIndex = 53 TabStop = 0 'False Top = 3720 Width = 5475 End Begin VB.TextBox txtOFAdj Alignment = 1 'Right Justify Height = 315 Left = 10320 MaxLength = 4 TabIndex = 30 Top = 810 Width = 915 End Begin VB.TextBox txtOFin2 Alignment = 1 'Right Justify Height = 315 Left = 8115 MaxLength = 4 TabIndex = 29 Top = 840 Width = 915 End Begin VB.ComboBox cboOFinish Height = 315 ItemData = "frmTake.frx":0C56 Left = 4695 List = "frmTake.frx":0C58 Style = 2 'Dropdown List TabIndex = 28 Top = 840 Width = 2235 End Begin VB.TextBox txtOBAmt Alignment = 1 'Right Justify Height = 315 Left = 10320 MaxLength = 6 TabIndex = 27 Top = 495 Width = 915 End Begin VB.TextBox txtOYdge Alignment = 1 'Right Justify Height = 315 Left = 8100 MaxLength = 4 TabIndex = 26 Top = 495 Width = 915 End Begin VB.TextBox txtODesc Height = 315 Left = 3660 MaxLength = 30 TabIndex = 25 Top = 495 Width = 3495 End Begin VB.ListBox lstOptions Height = 2010 Left = 240 TabIndex = 24 TabStop = 0 'False Top = 660 Width = 3195 End Begin VB.Frame fraYardage Caption = "Takeoff Yardage Information " BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 2460 Left = -68700 TabIndex = 199 Top = 2175 Width = 4995 Begin VB.TextBox txtStoneAdj Alignment = 1 'Right Justify Height = 315 Left = 3975 TabIndex = 259 Top = 1965 Width = 795 End Begin VB.TextBox txtWireAdj Alignment = 1 'Right Justify Height = 315 Left = 3960 MaxLength = 4 TabIndex = 19 Top = 1140 Width = 795 End Begin VB.CheckBox chkStone Alignment = 1 'Right Justify Caption = "Stone Veneer" Height = 255 Left = 1080 TabIndex = 16 Top = 1995 Width = 1335 End Begin VB.TextBox txtStone Alignment = 1 'Right Justify Height = 315 Left = 1380 TabIndex = 15 Top = 1560 Width = 1035 End Begin VB.TextBox txtFin2 Alignment = 1 'Right Justify Height = 315 Left = 3960 MaxLength = 4 TabIndex = 20 Top = 1560 Width = 795 End Begin VB.TextBox txtLaborAdj Alignment = 1 'Right Justify Height = 315 Left = 3960 MaxLength = 4 TabIndex = 18 Top = 720 Width = 795 End Begin VB.TextBox txtFoamAdj Alignment = 1 'Right Justify Height = 315 Left = 3960 MaxLength = 4 TabIndex = 17 Top = 300 Width = 795 End Begin VB.TextBox txtCMUYds Alignment = 1 'Right Justify Height = 315 Left = 1380 MaxLength = 5 TabIndex = 14 Top = 1140 Width = 1035 End Begin VB.TextBox txtPrcntge Alignment = 1 'Right Justify Height = 315 Left = 1380 MaxLength = 4 TabIndex = 13 Top = 720 Width = 1035 End Begin VB.TextBox txtOpenings Alignment = 1 'Right Justify Height = 315 Left = 1380 MaxLength = 6 TabIndex = 12 Top = 300 Width = 1035 End Begin VB.Label lblWireAdj Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Wire Adj. Ydge:" Height = 195 Left = 2760 TabIndex = 229 Top = 1200 Width = 1110 End Begin VB.Label lblStone Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Stone V. Sq Ft:" Height = 195 Left = 225 TabIndex = 227 Top = 1620 Width = 1080 End Begin VB.Label lblFin2 Alignment = 1 'Right Justify Caption = "Finish 2 Yardage: Stone Ded Ydge:" Height = 675 Left = 2610 TabIndex = 205 Top = 1620 Width = 1260 End Begin VB.Label lblLaborAdj Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Labor Adj. Ydge:" Height = 195 Left = 2685 TabIndex = 204 Top = 780 Width = 1185 End Begin VB.Label lblFoamAdj Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Foam Adj. Ydge:" Height = 195 Left = 2700 TabIndex = 203 Top = 360 Width = 1170 End Begin VB.Label lblCMUYds Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "CMU Sq Ft:" Height = 195 Left = 480 TabIndex = 202 Top = 1200 Width = 825 End Begin VB.Label lblOpenings Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Total Openings:" Height = 195 Left = 180 TabIndex = 201 Top = 360 Width = 1125 End Begin VB.Label lblPrcntge Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Percentage:" Height = 195 Left = 435 TabIndex = 200 Top = 780 Width = 870 End End Begin VB.Label lblOptNum Height = 270 Left = 255 TabIndex = 258 Top = 390 Width = 2400 End Begin VB.Label lbl2S Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "2S" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = -74625 TabIndex = 250 Top = 1920 Width = 240 End Begin VB.Label lblScaf10 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "10'8""" Height = 195 Left = 7860 TabIndex = 247 Top = 2340 Width = 375 End Begin VB.Label Scaf6 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "6'8""" Height = 195 Left = 7950 TabIndex = 246 Top = 1920 Width = 285 End Begin VB.Label lblOScaffold Alignment = 2 'Center Caption = "Option Scaffolding" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 7620 TabIndex = 245 Top = 1560 Width = 1695 End Begin VB.Label lblSS Alignment = 1 'Right Justify Caption = "Skip/RSand Finish:" Height = 255 Left = -68580 TabIndex = 236 Top = 4200 Width = 1455 End Begin VB.Label lblOStone Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Stone V. Option Sq Ft:" Height = 195 Left = 8715 TabIndex = 228 Top = 1230 Width = 1590 End Begin VB.Label lblMF Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Monterrey/Sand:" Height = 195 Left = -68325 TabIndex = 224 Top = 3900 Width = 1200 End Begin VB.Label lblSYN Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "EIFS SandBlast:" Height = 195 Left = -68280 TabIndex = 214 Top = 3660 Width = 1155 End Begin VB.Label lblFS3 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Sand 30 Finish:" Height = 195 Left = -68220 TabIndex = 209 Top = 1620 Width = 1095 End Begin VB.Label lblFS2 AutoSize = -1 'True Caption = "Sand 20 Finish:" Height = 195 Left = -68220 TabIndex = 208 Top = 1320 Width = 1095 End Begin VB.Label lblOMMLength Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Metal Length:" Height = 195 Left = 8580 TabIndex = 189 Top = 4380 Width = 975 End Begin VB.Label lblOMCFlag Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Metal Flag:" Height = 195 Left = 8775 TabIndex = 188 Top = 3990 Width = 780 End Begin VB.Label lblOMMType Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Material Type:" Height = 195 Left = 8550 TabIndex = 187 Top = 3600 Width = 1005 End Begin VB.Label lblOMDFlag Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Delivery Flag:" Height = 195 Left = 5820 TabIndex = 186 Top = 4380 Width = 960 End Begin VB.Label lblOMPrice Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Price:" Height = 195 Left = 6375 TabIndex = 185 Top = 3990 Width = 405 End Begin VB.Label lblOMQty Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Quantity:" Height = 195 Left = 6150 TabIndex = 184 Top = 3600 Width = 630 End Begin VB.Label lblOMDesc Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Description:" Height = 195 Left = 5940 TabIndex = 183 Top = 3210 Width = 840 End Begin VB.Label lblOMInvNo Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Inventory No:" Height = 195 Left = 5820 TabIndex = 182 Top = 2820 Width = 960 End Begin VB.Label lblMatDesc Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Description:" Height = 195 Left = -68970 TabIndex = 169 Top = 930 Width = 840 End Begin VB.Label lblMetLength Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Metal Length:" Height = 195 Left = -69105 TabIndex = 168 Top = 3060 Width = 975 End Begin VB.Label lblMetal Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Metal Flag:" Height = 195 Left = -68910 TabIndex = 167 Top = 2700 Width = 780 End Begin VB.Label lblMType Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Material Type:" Height = 195 Left = -69150 TabIndex = 166 Top = 2340 Width = 1005 End Begin VB.Label lblDFlag Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Delivery Type:" Height = 195 Left = -69150 TabIndex = 165 Top = 1980 Width = 1020 End Begin VB.Label lblMatPrice Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Unit Price:" Height = 195 Left = -68865 TabIndex = 164 Top = 1620 Width = 735 End Begin VB.Label lblMatQty Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Quantity:" Height = 195 Left = -68760 TabIndex = 163 Top = 1260 Width = 630 End Begin VB.Label lblInvno Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Inventory No:" Height = 195 Left = -69090 TabIndex = 162 Top = 585 Width = 960 End Begin VB.Label lblMeType Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Measurement Type:" Height = 195 Left = -67080 TabIndex = 154 Top = 1140 Width = 1410 End Begin VB.Label lblMeLocate Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Measurement Location:" Height = 195 Left = -71460 TabIndex = 153 Top = 1140 Width = 1665 End Begin VB.Label lblMeSqFt Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Square Feet:" Height = 195 Left = -66600 TabIndex = 152 Top = 660 Width = 915 End Begin VB.Label lblMeDesc Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Description:" Height = 195 Left = -71460 TabIndex = 151 Top = 660 Width = 840 End Begin VB.Label lblDF AutoSize = -1 'True Caption = "Skip/Sand Finish:" Height = 195 Left = -68385 TabIndex = 137 Top = 3360 Width = 1260 End Begin VB.Label lblOptTextures Caption = "Optional Textures" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = -66360 TabIndex = 120 Top = 420 Width = 795 End Begin VB.Label lblPrimary Caption = "Primary Texture" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = -67200 TabIndex = 113 Top = 420 Width = 735 End Begin VB.Label lblFQuern AutoSize = -1 'True Caption = "Quernavaca Finish:" Height = 195 Left = -68430 TabIndex = 111 Top = 3060 Width = 1305 End Begin VB.Label lblFMont AutoSize = -1 'True Caption = "Monterrey Finish:" Height = 195 Left = -68325 TabIndex = 110 Top = 2760 Width = 1200 End Begin VB.Label lblFSmooth AutoSize = -1 'True Caption = "Smooth Finish:" Height = 195 Left = -68160 TabIndex = 109 Top = 2460 Width = 1035 End Begin VB.Label lblFDash AutoSize = -1 'True Caption = "Dash Finish:" Height = 195 Left = -67980 TabIndex = 108 Top = 2160 Width = 870 End Begin VB.Label lblFSkip AutoSize = -1 'True Caption = "Skip Trowel:" Height = 195 Left = -68010 TabIndex = 107 Top = 1860 Width = 885 End Begin VB.Label lblFSand Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Sand 16 Finish:" Height = 195 Left = -68220 TabIndex = 106 Top = 1035 Width = 1095 End Begin VB.Line Line4 BorderWidth = 2 X1 = -68640 X2 = -68640 Y1 = 360 Y2 = 4920 End Begin VB.Label lblBurDesc Alignment = 1 'Right Justify Appearance = 0 'Flat BackColor = &H80000004& BorderStyle = 1 'Fixed Single Caption = "Burden Rates Stucco .16 Lath .14 Scaffold .14 " ForeColor = &H80000008& Height = 855 Left = -74760 TabIndex = 104 Top = 3780 Width = 1155 End Begin VB.Line Line3 BorderWidth = 2 X1 = -71460 X2 = -68640 Y1 = 2880 Y2 = 2880 End Begin VB.Label lblSQYDPR AutoSize = -1 'True Caption = "Price Per SQ YD:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = -71160 TabIndex = 97 Top = 3420 Width = 1485 End Begin VB.Label lblCMUPr AutoSize = -1 'True Caption = "CMU Price:" Height = 195 Left = -71400 TabIndex = 96 Top = 3060 Width = 810 End Begin VB.Label lblBidwCMU Alignment = 1 'Right Justify Caption = "BID PRICE w/CMU:" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = -71340 TabIndex = 95 Top = 2160 Width = 1335 End Begin VB.Label lblBidPrice AutoSize = -1 'True Caption = "BID PRICE:" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 240 Left = -71220 TabIndex = 94 Top = 1740 Width = 1185 End Begin VB.Line Line2 BorderWidth = 2 X1 = -71460 X2 = -68640 Y1 = 1560 Y2 = 1560 End Begin VB.Line Line1 BorderWidth = 2 X1 = -72540 X2 = -71580 Y1 = 4080 Y2 = 4080 End Begin VB.Label lblOH Caption = "Overhead:" Height = 195 Left = -71280 TabIndex = 93 Top = 1200 Width = 795 End Begin VB.Label lblMarkup AutoSize = -1 'True Caption = "Markup:" Height = 195 Left = -71100 TabIndex = 92 Top = 840 Width = 585 End Begin VB.Label lblTtlCost Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Total Cost:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = -70830 TabIndex = 91 Top = 480 Width = 945 End Begin VB.Label lblLaborBurden Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Labor Burden:" Height = 195 Left = -73470 TabIndex = 89 Top = 3720 Width = 1005 End Begin VB.Label lblMatMU Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Material Markup:" Height = 195 Left = -74460 TabIndex = 87 Top = 3360 Width = 1185 End Begin VB.Label lblTtlMat Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Total Materials:" Height = 195 Left = -73605 TabIndex = 86 Top = 3000 Width = 1080 End Begin VB.Label lblMisc AutoSize = -1 'True Caption = "Misc. Items Cost:" Height = 195 Left = -73740 TabIndex = 73 Top = 2640 Width = 1200 End Begin VB.Label lblTape AutoSize = -1 'True Caption = "Tape/Plastic:" Height = 195 Left = -74175 TabIndex = 72 Top = 2280 Width = 960 End Begin VB.Label lblScaf AutoSize = -1 'True Caption = "Scaffold && Gas:" Height = 195 Left = -74310 TabIndex = 71 Top = 1920 Width = 1095 End Begin VB.Label lblMetLab AutoSize = -1 'True Caption = "Metal Labor:" Height = 195 Left = -74100 TabIndex = 70 Top = 1560 Width = 885 End Begin VB.Label lblLathLab AutoSize = -1 'True Caption = "Lath Labor:" Height = 195 Left = -74025 TabIndex = 69 Top = 1200 Width = 810 End Begin VB.Label lblStucLab AutoSize = -1 'True Caption = "Stucco Labor:" Height = 195 Left = -74220 TabIndex = 68 Top = 840 Width = 1005 End Begin VB.Label lblX2 AutoSize = -1 'True Caption = "=" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 300 Left = -72540 TabIndex = 66 Top = 420 Width = 165 End Begin VB.Label lblX1 AutoSize = -1 'True Caption = "X" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 240 Left = -73440 TabIndex = 60 Top = 480 Width = 150 End Begin VB.Label lblSand Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Sand:" Height = 195 Left = -74535 TabIndex = 58 Top = 480 Width = 420 End Begin VB.Label lblOFadj AutoSize = -1 'True Caption = "Foam Adj. Ydge:" Height = 195 Left = 9135 TabIndex = 52 Top = 900 Width = 1170 End Begin VB.Label lblOFin2 AutoSize = -1 'True Caption = "Finish 2 Ydge:" Height = 195 Left = 7035 TabIndex = 51 Top = 900 Width = 1005 End Begin VB.Label lblOTexture Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Option Texture:" Height = 195 Left = 3495 TabIndex = 50 Top = 900 Width = 1095 End Begin VB.Label lblBAmt AutoSize = -1 'True Caption = "Billing Amount:" Height = 195 Left = 9255 TabIndex = 49 Top = 555 Width = 1035 End Begin VB.Label lblYrdge AutoSize = -1 'True Caption = "Yardage:" Height = 195 Left = 7380 TabIndex = 48 Top = 555 Width = 645 End Begin VB.Label lblDesc Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Description:" Height = 195 Index = 0 Left = -71505 TabIndex = 47 Top = 660 Width = 840 End End Begin VB.ListBox lstMod_Elv Height = 2205 Left = 1380 Sorted = -1 'True TabIndex = 0 Top = 660 Width = 1395 End Begin VB.Label lblProject Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Project:" Height = 195 Left = 60 TabIndex = 256 Top = 300 Width = 540 End Begin VB.Label lblInvType BorderStyle = 1 'Fixed Single BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 9960 TabIndex = 254 Top = 180 Width = 1875 End Begin VB.Label lblSupercede Alignment = 2 'Center BackColor = &H0000FFFF& Caption = "Plan has been Superceded, Press CTRL-R to View" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H000000FF& Height = 555 Left = 4260 TabIndex = 253 Top = 1020 Visible = 0 'False Width = 3315 End Begin VB.Label lbl108 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "10' 8"" Frames" Height = 195 Left = 9960 TabIndex = 243 Top = 2580 Width = 975 End Begin VB.Label lbl68 Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "6' 8"" Frames" Height = 195 Left = 8130 TabIndex = 242 Top = 2580 Width = 885 End Begin VB.Label lblScaffold Alignment = 2 'Center Caption = "Scaffolding Frames Required" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 7800 TabIndex = 240 Top = 2280 Width = 4035 End Begin VB.Label lblUpdate Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Updated:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 7785 TabIndex = 233 Top = 1380 Width = 795 End Begin VB.Label txtCreated Caption = " " BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 945 Left = 8625 TabIndex = 232 Top = 1005 Width = 1725 End Begin VB.Label lblLSave Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Last Save:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 7650 TabIndex = 231 Top = 1200 Width = 930 End Begin VB.Label lblCreate Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Created:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 195 Left = 7845 TabIndex = 230 Top = 1005 Width = 735 End Begin VB.Label lblNewElv Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "New Plan/Elevation:" Height = 195 Left = 3225 TabIndex = 147 Top = 1080 Visible = 0 'False Width = 1470 End Begin VB.Label lblNotes AutoSize = -1 'True Caption = "Notes:" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 240 Left = 2940 TabIndex = 23 Top = 1380 Width = 690 End Begin VB.Label lblOneKote Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Stucco Type:" Height = 195 Left = 7395 TabIndex = 22 Top = 660 Width = 1020 End Begin VB.Label lblFinish Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Texture:" Height = 195 Left = 3930 TabIndex = 21 Top = 600 Width = 585 End Begin VB.Label lblStuccoYds Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Stucco Yards:" Height = 195 Left = 7770 TabIndex = 7 Top = 240 Width = 1005 End Begin VB.Label lblLathYds Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Lath Yards:" Height = 195 Left = 5745 TabIndex = 5 Top = 240 Width = 810 End Begin VB.Label lblTTLYds Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Total Yards:" Height = 195 Left = 3660 TabIndex = 4 Top = 240 Width = 855 End Begin VB.Label lblMod_Elv Alignment = 1 'Right Justify AutoSize = -1 'True Caption = "Model/Elevation:" Height = 195 Left = 60 TabIndex = 1 Top = 660 Width = 1215 End End Attribute VB_Name = "frmTake" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim moRS As Recordset Dim moRSMat As Recordset, moRSCMat As Recordset Dim moRSMeas As Recordset Dim moRSOpt As Recordset Dim moRSOptMat As Recordset Dim moRSProj As Recordset Dim moRSLAB As Recordset Dim mintOLDTOID As Long, mboolBAD As Boolean, mdblBrnLab As Double, mdblTexLab As Double Dim mboolSHOW As Boolean, mboolCALC As Boolean, mstrWIRE As String Dim mboolAdding As Boolean, mboolENTER As Boolean, mboolMEAS As Boolean Dim mstrType As String, mstrFILE As String, mboolUPDATE As Boolean Dim mboolCopy As Boolean, mintBOOKMARK As Integer, mintBOOKMARK2 As Integer Dim mintTOID As Long, mintOPTID As Long, mintPROJID As Long Dim mstrFINISH As String, mboolSETUP As Boolean, mboolMove As Boolean, strTYPE As String Private Sub cboMeLocate_Click() On Error GoTo Error_EH If cboMeLocate.ListIndex = 4 Or cboMeLocate.ListIndex = 5 Then txtMeType.Text = "B" ElseIf cboMeLocate.ListIndex = 6 Then txtMeType.Text = "M" Else txtMeType.Text = " " End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cboMeLocate_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cboOFinish_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyDelete Then cboOFinish.ListIndex = -1 End If End Sub Private Sub cmdAddMat_Click() cmdAddMat.Enabled = False cmdSaveMat.Enabled = True cmdDel1900.Enabled = False cmdDelMat.Enabled = False cmdSave.Enabled = False mboolAdding = True Call MatClear txtMatInvNo.SetFocus cmdFindMat.Visible = True End Sub Private Sub cmdAddOptMat_Click() mboolAdding = True Call OptMatClear cmdAddOpt.Enabled = False cmdDelOpt.Enabled = False cmdAddOptMat.Enabled = False cmdSaveOptMat.Enabled = True cmdSave.Enabled = False cmdDelOptMat.Enabled = False cmdSaveOpt.Enabled = False cmdFindOptMat.Visible = True lstMod_Elv.Enabled = False lstOptions.Enabled = False txtOMInvNo.SetFocus End Sub Private Sub cmdAddOpt_Click() Call OptClear mboolAdding = True cmdAddOpt.Enabled = False cmdDelOpt.Enabled = False cmdAddOptMat.Enabled = False cmdSave.Enabled = False cmdSaveOptMat.Enabled = False cmdDelOptMat.Enabled = False cmdSaveOpt.Enabled = True lstMod_Elv.Enabled = False txtODesc.SetFocus End Sub Private Sub cmdCalcOptTexture_Click() Dim strSQL As String Dim oRS As Recordset If chkDash = vbUnchecked And Not optPTex(4) Then txtDashPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'DA' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkDF = vbUnchecked And Not optPTex(8) Then txtDFPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'DF' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkMF = vbUnchecked And Not optPTex(10) Then txtMFPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'MF' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkSS = vbUnchecked And Not optPTex(11) Then txtSS = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'SS' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkMonterrey = vbUnchecked And Not optPTex(6) Then txtMonterreyPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'MN' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkQU = vbUnchecked And Not optPTex(7) Then txtQUPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'QU' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkSand = vbUnchecked And Not optPTex(0) Then txtSandPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'SA' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete End If End If If chkSand = vbUnchecked And Not optPTex(1) Then strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'S2' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete End If End If If Not chkSand = vbUnchecked And optPTex(2) Then strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'S3' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete End If End If If chkSB = vbUnchecked And Not optPTex(9) Then txtSBPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'SB' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkSkip = vbUnchecked And Not optPTex(3) Then txtSkipPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'SK' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If If chkSmooth = vbUnchecked And Not optPTex(5) Then txtSmoothPr = "" strSQL = "SELECT * FROM tblTOLabor WHERE texture = 'SM' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS.Delete ' Exit Sub End If End If Call SecondLoad End Sub Private Sub cmdCalcPrimary_Click() Dim intBookmark As Integer intBookmark = lstMod_Elv.ListIndex If Not Field2Str2(txtTTLYds) > 0 Then MsgBox "No Measurements Have Been Entered - Calculation Not Allowed", vbOKOnly, "No Measurement" Exit Sub End If Call cmdUpMeasCalc_Click ' Call GetLabor If IsNull(moRS!stype) Then MsgBox "No Stucco Type has been Selected" Exit Sub End If ' If moRS!finish = "DW" Then ' ' Else If moRS!stype <> "T" Then Call CalcOneKote End If If moRS!stype = "T" Then Call CalcThreeKote End If ' End If If mboolBAD Then MsgBox "Takeoff Calculation Was Not Completed - Wire Error" tabTake.Tab = 3 lstMod_Elv.ListIndex = intBookmark Exit Sub End If Call cmdSave_Click tabTake.Tab = 3 lstMod_Elv.ListIndex = intBookmark MsgBox "Takeoff Calculation is Complete" End Sub Private Sub CalcOneKote() Dim dblKote1 As Double, dblCMNT As Double, dblLime As Double Dim dblS16 As Double, dblS20 As Double, dblS30 As Double Dim dblBP As Double, dblRS As Double, dblBatch As Double Dim dblBB As Double, dblML As Double, dblFOAM As Double, strSELECT2 As String Dim dblMETAL As Double, dblSUM As Double, dblSYN As Double, strSQLX As String Dim oRS As Recordset, oRSS As Recordset, oRC As Recordset, oRX As Recordset Dim strSQL As String, strSELECT As String, strCHECK As String Dim boolOK As Boolean, dblWire As Double, dblLC As Double Dim dblSandBag As Double, dblBagBatch As Double, lngSandBatch As Long Dim dblSplitCost As Double, dblPYRO As Double On Error GoTo Error_EH mboolBAD = False mboolCALC = False If mstrWIRE = "P" Or mstrWIRE = "F" Then MsgBox "The Wire Type selected in projects is not correct for OneCoat - Calculate is not allowed", vbOKOnly, "Invalid Wire Type" mboolBAD = True Exit Sub End If dblBagBatch = Field2Str2(moRSProj!bagdollars) ' + 1 Call UpTexture strSELECT = "DELETE * FROM tblTOMatrl where cflag and toid = " & gintTOID goConn.Execute strSELECT Call LoadCMat If Not mboolCALC Then MsgBox "No Materials Entered Yet - Calc Not Allowed", vbOKOnly, "No Materials" Exit Sub End If txtLathYds = Int((txtTTLYds - (((Field2Integer(txtOpenings)) * (Field2Integer(txtPrcntge))) / 100)) + 0.99) If moRS!stype = "S" Then 'Superwall 1 Kote If Field2Str2(moRSProj!sw_adj) > 0 Then dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99) Else dblKote1 = Int((Field2Str(txtLathYds) / 9) + 0.99) End If End If If moRS!stype = "B" Then 'Superwall 1 Kote If Field2Str2(moRSProj!sw_adj) > 0 Then dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99) Else dblKote1 = Int((Field2Str(txtLathYds) / 9) + 0.99) End If End If If moRS!stype = "W" Then 'Western 1 Kote If Field2Str2(moRSProj!sw_adj) > 0 Then dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99) Else dblKote1 = Int((Field2Str(txtLathYds) / 10) + 0.99) End If End If If moRS!stype = "M" Then 'Magna Wall 1 Kote If Field2Str2(moRSProj!sw_adj) > 0 Then dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99) Else dblKote1 = Int((Field2Str(txtLathYds) / 10) + 0.99) End If End If If moRS!stype = "N" Then 'San Man 1 Kote If Field2Str2(moRSProj!sw_adj) > 0 Then dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99) Else dblKote1 = Int((Field2Str(txtLathYds) / 10) + 0.99) End If End If strSQL = "SELECT * from tblfinish WHERE ID = '" & mstrFINISH & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly ' dblBatch = Int((((Field2Str(txtLathYds) - 10) - Field2Str(txtFin2)) / Field2Str(oRS!yds)) + 0.99) dblBatch = Int((((Field2Str(txtLathYds) - 10) - Field2Str(txtFin2)) / Field2Str(oRS!t_yds)) + 0.99) If oRS!id = "SB" Then If Field2Str2(moRSProj!syn_t) > 0 Then dblSYN = Int((((Field2Str(txtLathYds) - 10) * 9) / Field2Str(moRSProj!syn_t)) + 0.99) Else dblSYN = Int((((Field2Str(txtLathYds) - 10) * 9) / Field2Str(oRS!t_yds)) + 0.99) End If End If If Field2Str(oRS!t_cmnt) > 0 Then dblCMNT = dblBatch * Field2Integer(oRS!t_cmnt) Else dblCMNT = 0 End If If Field2Str(oRS!t_lime) > 0 Then dblLime = dblBatch * Field2Integer(oRS!t_lime) Else dblLime = 0 End If If Field2Str(oRS!t_s16) > 0 Then ' If Field2Str(oRS!t_s16) > 0 Or Field2Str(oRS!t_s20) > 0 Or Field2Str(oRS!t_s30) > 0 Then dblS16 = dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30)) ' dblS16 = dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30)) Else dblS16 = 0 End If If Field2Str(oRS!t_s20) > 0 Then ' If Field2Str(oRS!t_s16) > 0 Or Field2Str(oRS!t_s20) > 0 Or Field2Str(oRS!t_s30) > 0 Then dblS20 = dblBatch * (Field2Integer(oRS!t_s20)) ' dblS16 = dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30)) Else dblS20 = 0 End If If Field2Str(oRS!t_brs) > 0 Then dblRS = (((dblKote1 * Field2Integer(oRS!t_brs)) + (dblBatch * (Field2Integer(oRS!t_trs))) + (Field2Integer(oRS!t_xrs))) / 2000) Else dblRS = 0 End If oRS.Close If Field2Str(txtFin2) > 0 Then strSQL = "SELECT * from tblfinish WHERE ID = 'SA'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly dblBatch = Int(((Field2Str(txtFin2)) / Field2Str(oRS!t_yds)) + 0.99) If Field2Str(oRS!t_cmnt) > 0 Then dblCMNT = dblCMNT + (dblBatch * Field2Integer(oRS!t_cmnt)) End If If Field2Str(oRS!t_lime) > 0 Then dblLime = dblLime + (dblBatch * Field2Integer(oRS!t_lime)) End If If Field2Str(oRS!t_s16) > 0 Then ' If Field2Str(oRS!t_s16) > 0 Or Field2Str(oRS!t_s20) > 0 Or Field2Str(oRS!t_s30) > 0 Then dblS16 = dblS16 + (dblBatch * (Field2Integer(oRS!t_s16))) ' dblS16 = dblS16 + (dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30))) End If If Field2Str(oRS!t_s20) > 0 Then ' If Field2Str(oRS!t_s16) > 0 Or Field2Str(oRS!t_s20) > 0 Or Field2Str(oRS!t_s30) > 0 Then dblS20 = dblS20 + (dblBatch * Field2Integer(oRS!t_s20)) ' dblS16 = dblS16 + (dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30))) End If If Field2Str(oRS!t_trs) > 0 Then dblRS = dblRS + ((dblBatch * Field2Integer(oRS!t_trs)) / 2000) End If End If ' oRS.Close If dblCMNT > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2410' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblCMNT = Int((dblCMNT) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2410' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblCMNT moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Int((dblCMNT * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If oRC.Close End If If dblLime > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2430' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblLime = Int((dblLime) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2430' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblLime moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblLime * Field2Str(oRSS!tprice)) + 0.99) End If End If If dblS16 > 0 Then If moRSProj!silica Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2316' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblS16 = Int((dblS16) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2316' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblS16 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update moRS!silica = Int((dblS16 * Field2Str(oRSS!tprice)) + 0.99) End If End If Else strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2366' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblS16 = Int((dblS16) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2366' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblS16 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update moRS!silica = Int((dblS16 * Field2Str(oRSS!tprice)) + 0.99) End If End If End If End If If dblS20 > 0 Then If moRSProj!silica Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2320' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblS20 = Int((dblS20) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2320' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblS20 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update moRS!silica = Int((dblS20 * Field2Str(oRSS!tprice)) + 0.99) End If End If Else strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2370' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblS20 = Int((dblS20) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2370' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblS20 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update moRS!silica = Int((dblS20 * Field2Str(oRSS!tprice)) + 0.99) End If End If End If End If If dblSYN > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2600' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2600' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblSYN moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str2(moRS!c_l) + Int((dblSYN * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If oRC.Close strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2610' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2610' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) dblSYN = Int((dblSYN / 10) + 0.5) moRSCMat!qty = dblSYN moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str2(moRS!c_l) + Int((dblSYN * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If oRC.Close End If ' oRSS.Close '****** move to after One Coat calculation ' If dblRS > 0 Then ' dblRS = Int((dblRS) + 0.99) ' txtSandTons = dblRS ' End If 'Calculate Black Board strSELECT = "SELECT SUM(sq_yds) AS ttlyds FROM tblMeasure WHERE type = 'B' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly dblBB = Int((Field2Long(oRS!ttlyds) / 9) + 0.99) If dblBB > 0 Then strSQLX = "SELECT * FROM tblTOMatrl WHERE toid = " & gintTOID Set oRX = New Recordset oRX.Open strSQLX, goConn, adOpenDynamic, adLockOptimistic If Not oRX.EOF Then oRX.MoveFirst strSELECT2 = "inv_no = '1310'" oRX.Find strSELECT2 If Not oRX.EOF Then oRX.Delete End If oRX.MoveFirst strSELECT2 = "inv_no = '1315'" oRX.Find strSELECT2 If Not oRX.EOF Then oRX.Delete End If oRX.MoveFirst strSELECT2 = "inv_no = '1317'" oRX.Find strSELECT2 If Not oRX.EOF Then oRX.Delete End If oRX.MoveFirst strSELECT2 = "inv_no = '1805'" oRX.Find strSELECT2 If Not oRX.EOF Then oRX.Delete End If End If If moRSProj!bb Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1310' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1310' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblBB / 3.5) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbUnchecked moRSCMat.Update End If End If Else If moRSProj!rg12 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1315' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1315' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblBB / 3.5) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbUnchecked moRSCMat.Update End If End If ElseIf moRSProj!rg1 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1317' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1317' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblBB / 3.5) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbUnchecked moRSCMat.Update End If End If ElseIf moRSProj!pyro Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1805' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1805' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblBB / 50) + 0.99) 'Added 11/3/17 for Pyro Paper moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbUnchecked moRSCMat.Update End If End If End If End If End If 'Calculate Latex Caulking **** This may need to just update the qty in the TOMaterial file. dblLC = Int(((Field2Long(txtLathYds) / 25) * 2) + 0.99) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1820' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1820' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblLC moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbUnchecked moRSCMat.Update End If End If 'Calculate Metal Lath strSELECT = "SELECT SUM(sq_yds) AS ttlyds FROM tblMeasure WHERE type = 'M' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly dblML = Int((Field2Long(oRS!ttlyds) / 9) + 0.99) If dblML > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1330' and toid = " & gintTOID ' strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 1370 and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1330' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblML / 1.77) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbUnchecked moRSCMat.Update End If End If End If 'Calculate Foam dblFOAM = Field2Long(txtLathYds) - Field2Integer(txtFoamAdj) If moRSProj!ftype = "O" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1210' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1210' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) ' moRSCMat!qty = Int(((dblFOAM - (dblML + dblBB)) / 1.5) + 0.99) moRSCMat!qty = Int(((dblFOAM - (dblML + dblBB)) / 1.77) + 0.99) ' ** Changed to 1.5 4/9/2012 per JG ' ** Changed back to 1.77 6/27/2012 per JR because of Shea Homes moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If If moRSProj!ftype = "T" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1210' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1210' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int(((dblFOAM - (dblML + dblBB)) / 1.5) + 0.99) ' moRSCMat!qty = Int(((dblFOAM - (dblML + dblBB)) / 1.77) + 0.99) ' ** Changed to 1.5 4/9/2012 per JG moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If If moRSProj!ftype = "U" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1260' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1260' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int(((dblFOAM - (dblML + dblBB)) / 3.5) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If If moRSProj!ftype = "D" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1250' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1250' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int(((dblFOAM - (dblML + dblBB)) / 1.77) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If 'Calculate Black paper If moRSProj!bp_type = "BD" Then dblBP = Int(((Field2Long(txtLathYds) / 33) * 2) + 0.99) ElseIf moRSProj!bp_type = "B1" Then dblBP = 1 ElseIf moRSProj!bp_type = "TV" Then dblBP = Int(((Field2Long(txtLathYds) / 30)) + 0.99) ElseIf moRSProj!bp_type = "B6" Then dblBP = Int(((Field2Long(txtLathYds) / 20) * 1.5) + 0.99) ' dblBP = Int(((Field2Integer(txtLathYds) / 33) * 1.5) + 0.99) ElseIf moRSProj!bp_type = "B7" Then dblBP = Int(((Field2Long(txtLathYds) / 16)) + 0.99) 'Changed per Jesse 10/12/15 ' dblBP = Int(((Field2Long(txtLathYds) / 16) * 1.5) + 0.99) Else dblBP = Int(((Field2Integer(txtLathYds) / 33) * 1.5) + 0.99) End If If moRSProj!bp_type = "TV" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1815' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1815' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBP moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If Else moRSCMat!qty = dblBP moRSCMat.Update End If strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1816' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1816' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int(((Field2Long(txtLathYds) / 300)) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If Else moRSCMat!qty = Int(((Field2Long(txtLathYds) / 300)) + 0.99) moRSCMat.Update End If ElseIf moRSProj!bp_type = "B6" Then '60 minute black paper dblBP = Int(((Field2Long(txtLathYds) / 20) * 1.5) + 0.99) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1809' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1809' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBP moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If ElseIf moRSProj!bp_type = "B7" Then dblBP = Int(((Field2Long(txtLathYds) / 16)) + 0.99) 'Changed per Jesse 10/12/15 ' dblBP = Int(((Field2Long(txtLathYds) / 16) * 1.5) + 0.99) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1811' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1811' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBP moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If ' End If Else strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1810' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1810' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBP moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If 'Calculate Stucco Wire dblWire = Field2Long(txtLathYds) - Field2Integer(txtWireAdj) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1410' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1410' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblWire / 45) + 0.99) '***** Wire changed to 45 yds per Jesse on 3/24/10 ' moRSCMat!qty = Int((dblWire / 40) + 0.99) '***** Wire changed to 40 yds per Jesse on 6/28/05 ' moRSCMat!qty = Int((dblWire / 50) + 0.99) ' moRSCMat!qty = Int((Field2Integer(txtLathYds) / 50) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If 'Calculate 1 Kote If moRS!stype = "S" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '5220' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '5220' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly boolOK = True End If ElseIf moRS!stype = "B" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '5220' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '5220' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly boolOK = True End If ElseIf moRS!stype = "W" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2210' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2210' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly boolOK = True End If ElseIf moRS!stype = "M" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2250' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2250' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly boolOK = True End If ElseIf moRS!stype = "N" Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2260' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2260' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly boolOK = True End If End If If boolOK Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblKote1 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If lngSandBatch = dblKote1 + dblCMNT '******** complete this dblSandBag = lngSandBatch * dblBagBatch If moRSProj!BagSand Then If dblSandBag > 0 Then lblSand = "Sand Bags:" dblSandBag = Int((dblSandBag) + 0.99) txtSandTons = dblSandBag End If Else If dblRS > 0 Then lblSand = "Sand Tons:" dblRS = Int((dblRS) + 0.99) txtSandTons = dblRS End If End If 'Calculate Nails & Staples moRSCMat.MoveFirst strSELECT = "inv_no = '1610'" moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Round(((Field2Long(txtLathYds) / 400) + 0.05), 1) moRSCMat.Update End If moRSCMat.MoveFirst strSELECT = "inv_no = '1730'" moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Round(((Field2Long(txtLathYds) / 200) + 0.05), 1) moRSCMat.Update End If moRSCMat.MoveFirst strSELECT = "inv_no = '1710'" moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Round(((Field2Long(txtLathYds) / 200) + 0.05), 1) moRSCMat.Update End If moRSCMat.MoveFirst strSELECT = "inv_no = '1720'" moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Round(((Field2Long(txtLathYds) / 200) + 0.05), 1) moRSCMat.Update End If 'Calculate Metal Feet strSELECT = "SELECT SUM(Calc_amt * qty) AS ttlmetal FROM tbltomatrl WHERE calc_flag = 'M' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly dblMETAL = Field2Str2(oRS!ttlmetal) txtMetalFt = dblMETAL If Not moRSProj!BagSand Then If Field2Str(txtSandTons) < 16 Then dblSplitCost = Field2Str2(moRSProj!splitcst) txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") txtSandAmt = Field2Integer(txtSandAmt) + dblSplitCost ' txtSandAmt = Field2Integer(txtSandAmt) + 40 Else txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") End If Else txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") End If If chk2Story Then txtScafGas = Int((Field2Long(txtTTLYds) * (Field2Str(txtSGRate) * 1.2)) + 0.99) ' txtScafGas = Int((Field2Integer(txtTTLYds) * (Field2Str(txtSGRate) * 1.5)) + 0.99) Else txtScafGas = Int((Field2Long(txtTTLYds) * Field2Str(txtSGRate)) + 0.99) End If txtTape = Int((Field2Long(txtTTLYds) * Field2Str(txtTPRate)) + 0.99) txtOH = Int((Field2Long(txtTTLYds) * Field2Str(txtOHRate)) + 0.99) ' txtStucLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj)) * Field2Str(txtSLRate)) + 0.99) mdblTexLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj) - Field2Integer(txtStoneAdj)) * (Field2Str(txtSLRate) / 2)) + 0.99) mdblBrnLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj)) * (Field2Str(txtSLRate) / 2)) + 0.99) txtStucLab = Int((mdblBrnLab + mdblTexLab) + 0.99) txtLathLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj)) * Field2Str(txtLLRate)) + 0.99) txtMetLab = Int((Field2Str2(txtMetalFt) * Field2Str(txtMLRate)) + 0.99) txtCMUPrice = Int((Field2Integer(txtCMUYds) * Field2Str(txtCMURate)) + 0.99) ' txtLabBur = Int(((Field2Str2(txtLathLab) * 0.14) + (Field2Str2(txtStucLab) * 0.16) + (Field2Str2(txtMetLab) * 0.14)) + 0.99) txtLabBur = Int(((Field2Str2(txtLathLab) * 0.14) + (Field2Str2(txtStucLab) * 0.16) + (Field2Str2(txtMetLab) * 0.14) + (Field2Str2(txtScafGas) * 0.14)) + 0.99) 'update prices strSQL = "SELECT SUM(qty * price) as MatPrice FROM tblTOMatrl WHERE toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly txtTtlMat = Int(Field2Str(oRS!matprice) + 0.99) txtMatMU = Int((Field2Long(txtTtlMat) * Field2Str(Format(txtMatMURate, "general number"))) + 0.99) dblSUM = Field2Long(txtSandAmt) + Field2Str2(txtStucLab) + Field2Str2(txtLathLab) dblSUM = dblSUM + Field2Str2(txtMetLab) + Field2Long(txtScafGas) + Field2Long(txtTape) dblSUM = dblSUM + Field2Str2(txtMisc) + Field2Str2(txtTtlMat) + Field2Long(txtMatMU) dblSUM = dblSUM + Field2Long(txtLabBur) txtTtlCost = dblSUM dblSUM = 0 txtTtlMU = Int((Field2Str2(txtTtlCost) * Format(txtMURate, "general number")) + 0.99) txtBidPrwCMU = Int((Field2Str2(txtTtlCost) + Field2Long(txtTtlMU) + Field2Integer(txtOH) + Field2Long(txtCMUPrice)) + 0.99) txtBidPrice = Field2Str2(txtBidPrwCMU) - Field2Str2(txtCMUPrice) Exit Sub Error_EH: gstrMODULE = "Form Take - Module CalcOneKote" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdCopy_Click() Dim strMODEL As String, strSQL As String Dim oRS As Recordset On Error GoTo Error_EH mboolCopy = True strMODEL = InputBox("Enter the New Model/Elevation for this Takeoff", "Model/Elevation") If strMODEL <> "" Then strSQL = "SELECT Toid, proj_id, pln_elv from tblTake WHERE not supersede and Proj_id = " & gintPROJID & " and pln_elv = '" & strMODEL & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If oRS.RecordCount = 0 Then txtNewElv = UCase(strMODEL) mboolCopy = True mintPROJID = gintPROJID Call cmdSave_Click Else MsgBox "The Model/Elevation you entered is already being used. Verify the Model/Elevation and try again!", vbOKOnly, "Invalid Model/Elevation" cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdDelOpt.Enabled = False cmdCopyOpt.Enabled = False cmdAddOptMat.Enabled = True Exit Sub End If Else Exit Sub End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdCopy_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub Supersede() Dim strMODEL As String, strSQL As String Dim oRS As Recordset On Error GoTo Error_EH mboolCopy = True strMODEL = lstMod_Elv.Text '(lstMod_Elv.ListIndex) If strMODEL <> "" Then strSQL = "SELECT Toid, proj_id, pln_elv, supersede from tblTake WHERE not supersede and Proj_id = " & gintPROJID & " and pln_elv = '" & strMODEL & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If oRS.RecordCount = 0 Then txtNewElv = UCase(strMODEL) mboolCopy = True mintPROJID = gintPROJID Call cmdSave_Click Else MsgBox "The Model/Elevation you entered is already being used. Verify the Model/Elevation and try again!", vbOKOnly, "Invalid Model/Elevation" cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdDelOpt.Enabled = False cmdCopyOpt.Enabled = False cmdAddOptMat.Enabled = True Exit Sub End If Else Exit Sub End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module Supersede" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdCopyOpt_Click() Dim strMODEL As String, strSQL As String Dim oRS As Recordset On Error GoTo Error_EH strMODEL = InputBox("Enter the Model/Elevation to Copy this Option", "Model/Elevation") If strMODEL <> "" Then strSQL = "SELECT Toid, proj_id, pln_elv from tblTake WHERE not supersede and Proj_id = " & gintPROJID & " and pln_elv = '" & strMODEL & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If oRS.RecordCount > 0 Then mintTOID = oRS!toid mboolCopy = True Call cmdSaveOpt_Click Else MsgBox "The Model/Elevation you entered was not found. Verify the Model/Elevation and try again!", vbOKOnly, "Invalid Model/Elevation" cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdDelOpt.Enabled = False cmdCopyOpt.Enabled = False cmdAddOptMat.Enabled = True Exit Sub End If Else Exit Sub End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdCopyOpt_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub CalcThreeKote() Dim dblKote1 As Double, dblCMNT As Double, dblLime As Double Dim dblSCmnt As Double, dblSLime As Double Dim dblBCMNT As Double, dblBLime As Double Dim dblS16 As Double, dblS20 As Double, dblS30 As Double Dim dblBP As Double, dblRS As Double, dblBatch As Double Dim dblBB As Double, dblML As Double, dblFOAM As Double Dim dblMETAL As Double, dblSUM As Double, dblSYN As Double Dim oRS As Recordset, oRSS As Recordset, oRC As Recordset Dim strSQL As String, strSELECT As String, dblWire As Double Dim boolOK As Boolean, strCHECK As String Dim dblSandBag As Double, dblBagBatch As Double, lngSandBatch As Long Dim dblSplitCost As Double On Error GoTo Error_EH mboolBAD = False If mstrWIRE = "O" Then MsgBox "The Wire Type selected in projects is not correct for Three Coat - Calculate is not allowed", vbOKOnly, "Invalid Wire Type" mboolBAD = True Exit Sub End If dblBagBatch = 0 Call UpTexture strSELECT = "DELETE * FROM tblTOMatrl where cflag and toid = " & gintTOID goConn.Execute strSELECT Call LoadCMat txtLathYds = Int((txtTTLYds - (((Field2Integer(txtOpenings)) * (Field2Integer(txtPrcntge))) / 100)) + 0.99) strSQL = "SELECT * from tbltcinfo" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly 'Brown dblBatch = Int((Field2Str(txtLathYds) / Field2Str(oRS!t_brn_yd)) + 0.99) If Field2Str(oRS!t_brn_cmnt) > 0 Then dblBCMNT = dblBatch * Field2Integer(oRS!t_brn_cmnt) Else dblBCMNT = 0 End If If Field2Str(oRS!t_brn_lime) > 0 Then dblBLime = dblBatch * Field2Integer(oRS!t_brn_lime) Else dblBLime = 0 End If If Field2Str(oRS!t_brn_rs) > 0 Then dblRS = (dblBatch * Field2Integer(oRS!t_brn_rs)) Else dblRS = 0 End If 'Scratch dblBatch = Int((Field2Str(txtLathYds) / Field2Str(oRS!t_scr_yd)) + 0.99) If Field2Str(oRS!t_scr_cmnt) > 0 Then dblSCmnt = dblBatch * Field2Integer(oRS!t_scr_cmnt) Else dblSCmnt = 0 End If If Field2Str(oRS!t_scr_lime) > 0 Then dblSLime = dblBatch * Field2Integer(oRS!t_scr_lime) Else dblSLime = 0 End If If Field2Str(oRS!t_scr_rs) > 0 Then dblRS = dblRS + (dblBatch * Field2Integer(oRS!t_scr_rs)) Else dblRS = 0 End If 'Texture strSQL = "SELECT * from tblfinish WHERE ID = '" & mstrFINISH & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly dblBatch = Int((((Field2Str(txtLathYds) - 10) - Field2Str(txtFin2)) / Field2Str(oRS!t_yds)) + 0.99) If oRS!id = "SB" Then dblSYN = Int((((Field2Str(txtLathYds) - 10) * 9) / Field2Str(oRS!t_yds)) + 0.5) End If If Field2Str(oRS!t_cmnt) > 0 Then dblCMNT = dblBatch * Field2Integer(oRS!t_cmnt) Else dblCMNT = 0 End If If Field2Str(oRS!t_lime) > 0 Then dblLime = dblBatch * Field2Integer(oRS!t_lime) Else dblLime = 0 End If If Field2Str(oRS!t_trs) > 0 Then dblRS = dblRS + (dblBatch * Field2Integer(oRS!t_trs)) + Field2Integer(oRS!t_xrs) ' Else ' dblRS = 0 End If If Field2Str(oRS!t_s16) > 0 Or Field2Str(oRS!t_s20) > 0 Or Field2Str(oRS!t_s30) > 0 Then dblS16 = dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30)) Else dblS16 = 0 End If If Field2Str(txtFin2) > 0 Then strSQL = "SELECT * from tblfinish WHERE ID = 'SA'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly dblBatch = Int((Field2Str(txtFin2) / Field2Str(oRS!t_yds)) + 0.99) If Field2Str(oRS!t_cmnt) > 0 Then dblCMNT = dblCMNT + (dblBatch * Field2Integer(oRS!t_cmnt)) Else dblCMNT = 0 End If If Field2Str(oRS!t_lime) > 0 Then dblLime = dblLime + (dblBatch * Field2Integer(oRS!t_lime)) Else dblLime = 0 End If If Field2Str(oRS!t_trs) > 0 Then dblRS = dblRS + (dblBatch * Field2Integer(oRS!t_trs)) + Field2Integer(oRS!t_xrs) ' Else ' dblRS = 0 End If If Field2Str(oRS!t_s16) > 0 Or Field2Str(oRS!t_s20) > 0 Or Field2Str(oRS!t_s30) > 0 Then dblS16 = dblS16 + (dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30))) ' Else ' dblS16 = 0 End If End If dblRS = Int((dblRS / 2000) + 0.99) 'Setup Cement If moRSProj!plcmnt Then If dblCMNT > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2414' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblCMNT = Int((dblCMNT) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2414' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblCMNT moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Int((dblCMNT * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If If dblSCmnt > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2416' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblSCmnt = Int((dblSCmnt) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2416' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblSCmnt moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblSCmnt * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If If dblBCMNT > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2415' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblBCMNT = Int((dblBCMNT) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2415' And Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBCMNT moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblBCMNT * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If Else If dblCMNT > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2410' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblCMNT = Int((dblCMNT) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2410' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblCMNT moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Int((dblCMNT * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If If dblSCmnt > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2412' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblSCmnt = Int((dblSCmnt) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2412' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblSCmnt moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblSCmnt * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If If dblBCMNT > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2411' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblBCMNT = Int((dblBCMNT) + 0.99) strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2411' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBCMNT moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblBCMNT * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If End If If dblSYN > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2600' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2600' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblSYN moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str2(moRS!c_l) + Int((dblSCmnt * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2610' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblInvtry where Inv_no = '2610' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) dblSYN = Int((dblSYN / 10) + 0.5) moRSCMat!qty = dblSYN moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblSCmnt * Field2Str(oRSS!tprice)) + 0.99) oRSS.Close End If End If 'Setup Lime If dblLime > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2430' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblLime = Int((dblLime) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2430' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblLime moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblLime * Field2Str(oRSS!tprice)) + 0.99) End If End If If dblSLime > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2432' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblSLime = Int((dblSLime) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2432' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblSLime moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!c_l = Field2Str(moRS!c_l) + Int((dblSLime * Field2Str(oRSS!tprice)) + 0.99) End If End If If dblBLime > 0 Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2431' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblBLime = Int((dblBLime) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2431' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBLime moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked End If moRSCMat.Update moRS!c_l = Field2Str(moRS!c_l) + Int((dblBLime * Field2Str(oRSS!tprice)) + 0.99) End If End If 'Setup Silica Sand If dblS16 > 0 Then If moRSProj!silica Then strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2316' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblS16 = Int((dblS16) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2316' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblS16 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!silica = Int((dblS16 * Field2Str(oRSS!tprice)) + 0.99) End If Else strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '2366' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then dblS16 = Int((dblS16) + 0.99) strSELECT = "SELECT * FROM tblINVtry where Inv_no = '2366' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblS16 moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If moRS!silica = Int((dblS16 * Field2Str(oRSS!tprice)) + 0.99) End If End If End If ' If dblRS > 0 Then ' txtSandTons = dblRS ' End If lngSandBatch = dblKote1 + dblCMNT dblSandBag = lngSandBatch * dblBagBatch If moRSProj!BagSand Then If dblSandBag > 0 Then lblSand = "Sand Bags:" dblSandBag = Int((dblSandBag) + 0.99) txtSandTons = dblSandBag End If Else If dblRS > 0 Then lblSand = "Sand Tons:" dblRS = Int((dblRS) + 0.99) txtSandTons = dblRS End If End If 'Calculate Black paper ' dblBP = Int(((Field2Integer(txtLathYds) / 33) * 1.5) + 0.99) 'Changed from 1.5 to 2 layers per Jesse 03/24/2010 If moRSProj!bp_type <> "B6" Then dblBP = Int(((Field2Long(txtLathYds) / 33) * 1.5) + 0.99) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1810' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1810' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBP moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If If moRSProj!bp_type = "B6" Then dblBP = Int(((Field2Long(txtLathYds) / 20) * 1.5) + 0.99) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1809' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1809' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = dblBP moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If 'Calculate Stucco Wire If mstrWIRE = "P" Then dblWire = Field2Long(txtLathYds) - Field2Integer(txtWireAdj) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1450' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1450' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblWire / 27) + 0.99) 'For bid purposes - use 33 for production purposes ' moRSCMat!qty = Int((dblWire / 33) + 0.99) ' moRSCMat!qty = Int((Field2Integer(txtLathYds) / 33) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If If mstrWIRE = "F" Then dblWire = Field2Long(txtLathYds) - Field2Integer(txtWireAdj) strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = '1417' and toid = " & gintTOID Set oRC = New Recordset oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockReadOnly If oRC.EOF Then strSELECT = "SELECT * FROM tblINVtry where Inv_no = '1417' and Inv_Type = " & gbytINV_TYPE Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly If Not oRSS.EOF Then moRSCMat.AddNew moRSCMat!toid = gintTOID moRSCMat!inv_no = Field2Str(oRSS!inv_no) moRSCMat!Desc = Field2Str(oRSS!Desc) moRSCMat!qty = Int((dblWire / 40) + 0.99) ' For bid purposes - use 45 for production ' moRSCMat!qty = Int((Field2Integer(txtLathYds) / 33) + 0.99) moRSCMat!price = Field2Str(oRSS!tprice) moRSCMat!d_flag = Field2Str(oRSS!d_flag) moRSCMat!m_type = Field2Str(oRSS!m_type) moRSCMat!calc_flag = Field2Str(oRSS!calc_flag) moRSCMat!calc_amt = Field2Str(oRSS!calc_amt) moRSCMat!cflag = vbChecked moRSCMat!trnsflag = vbChecked moRSCMat.Update End If End If End If 'Calculate Nails & Staples moRSCMat.MoveFirst strSELECT = "inv_no = '1616'" '4d Blue Nails moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Round(((Field2Long(txtLathYds) / 400) + 0.05), 1) moRSCMat.Update End If moRSCMat.MoveFirst strSELECT = "inv_no = '1730'" 'Rapid Staples moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Int((Field2Long(txtLathYds) / 400) + 0.99) moRSCMat.Update End If moRSCMat.MoveFirst strSELECT = "inv_no = '1705'" '7/8 Staples moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Round(((Field2Long(txtLathYds) / 250) + 0.05), 1) moRSCMat.Update End If moRSCMat.MoveFirst strSELECT = "inv_no = '1820'" 'Latex Caulking moRSCMat.Find strSELECT If Not moRSCMat.EOF Then moRSCMat!qty = Int(((Field2Long(txtLathYds) / 100) * 1.5) + 0.99) moRSCMat.Update End If 'Calculate Metal Feet strSELECT = "SELECT SUM(Calc_amt * qty) AS ttlmetal FROM tbltomatrl WHERE calc_flag = 'M' and toid = " & gintTOID Set oRS = New Recordset oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly dblMETAL = Field2Str2(oRS!ttlmetal) txtMetalFt = dblMETAL ' If Field2Integer(txtSandTons) < 16 Then ' txtSandAmt = Format(Int((Field2Integer(txtSandTons) * Field2Str(txtSandPrice)) + 0.99), "##,###") ' txtSandAmt = Field2Str2(txtSandAmt) + 30 ' Else ' txtSandAmt = Format(Int((Field2Integer(txtSandTons) * Field2Str(txtSandPrice)) + 0.99), "##,###") ' End If If Not moRSProj!BagSand Then If Field2Str(txtSandTons) < 16 Then dblSplitCost = Field2Str2(moRSProj!splitcst) txtSandAmt = Format((Field2Str(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") txtSandAmt = Field2Integer(txtSandAmt) + dblSplitCost ' txtSandAmt = Field2Integer(txtSandAmt) + 40 Else txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") End If Else txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") End If If chk2Story Then txtScafGas = Int((Field2Long(txtTTLYds) * (Field2Str(txtSGRate) * 1.2)) + 0.99) ' txtScafGas = Int((Field2Integer(txtTTLYds) * (Field2Str(txtSGRate) * 1.5)) + 0.99) Else txtScafGas = Int((Field2Long(txtTTLYds) * Field2Str(txtSGRate)) + 0.99) End If ' txtScafGas = Int((Field2Str2(txtTTLYds) * Field2Str(txtSGRate)) + 0.99) txtTape = Int((Field2Str2(txtTTLYds) * Field2Str(txtTPRate)) + 0.99) txtOH = Int((Field2Str2(txtTTLYds) * Field2Str(txtOHRate)) + 0.99) ' txtStucLab = Int((Field2Str2(txtLathYds) * Field2Str(txtSLRate)) + 0.99) mdblTexLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj) - Field2Integer(txtStoneAdj)) * (Field2Str(txtSLRate) / 2)) + 0.99) mdblBrnLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj)) * (Field2Str(txtSLRate) / 2)) + 0.99) txtStucLab = Int((mdblBrnLab + mdblTexLab) + 0.99) txtLathLab = Int((Field2Str2(txtLathYds) * Field2Str(txtLLRate)) + 0.99) txtMetLab = Int((Field2Str2(txtMetalFt) * Field2Str(txtMLRate)) + 0.99) txtCMUPrice = Int((Field2Str2(txtCMUYds) * Field2Str(txtCMURate)) + 0.99) ' txtLabBur = Int(((Field2Str2(txtLathLab) * 0.14) + (Field2Str2(txtStucLab) * 0.16) + (Field2Str2(txtMetLab) * 0.14)) + 0.99) txtLabBur = Int(((Field2Str2(txtLathLab) * 0.14) + (Field2Str2(txtStucLab) * 0.16) + (Field2Str2(txtMetLab) * 0.14) + (Field2Str2(txtScafGas) * 0.14)) + 0.99) 'update prices strSQL = "SELECT SUM(qty * price) as MatPrice FROM tblTOMatrl WHERE toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly txtTtlMat = Int(Field2Str(oRS!matprice) + 0.99) dblSUM = Field2Integer(txtSandAmt) + Field2Str2(txtStucLab) + Field2Str2(txtLathLab) dblSUM = dblSUM + Field2Str2(txtMetLab) + Field2Str2(txtScafGas) + Field2Str2(txtTape) dblSUM = dblSUM + Field2Str2(txtMisc) + Field2Str2(txtTtlMat) + Field2Str2(txtMatMU) dblSUM = dblSUM + Field2Str2(txtLabBur) txtTtlCost = dblSUM dblSUM = 0 txtMatMU = Int((Field2Str2(txtTtlMat) * Field2Str(Format(txtMatMURate, "general number"))) + 0.99) txtTtlMU = Int((Field2Str2(txtTtlCost) * Format(txtMURate, "general number")) + 0.99) txtBidPrwCMU = Int((Field2Long(txtTtlCost) + Field2Long(txtTtlMU) + Field2Long(txtOH) + Field2Long(txtCMUPrice)) + 0.99) txtBidPrice = Field2Long(txtBidPrwCMU) - Field2Long(txtCMUPrice) Exit Sub Error_EH: gstrMODULE = "Form Take - Module CalcThreeKote" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdDefaultMat_Click() gbytINV_TYPE = moRSProj!inv_type frmInvTake.Show 1 End Sub Private Sub cmdDel1900_Click() Dim strYN As String Dim strSQL As String strYN = MsgBox("Are You Sure You Want To Delete all 1900 series PopOuts?", vbCritical + vbYesNo, "Delete?") If strYN = vbNo Then Exit Sub End If mintBOOKMARK = lstTOMatrl.ListIndex strSQL = "DELETE * FROM tblTOMatrl WHERE Inv_no > 1899 and Inv_no < 2000 and toid = " & gintTOID goConn.Execute strSQL Call MatLoad cmdSaveMat.Enabled = False cmdDelMat.Enabled = False cmdDel1900.Enabled = False cmdAddMat.Enabled = True If lstTOMatrl.ListCount > 0 Then If lstTOMatrl.ListCount > mintBOOKMARK Then lstTOMatrl.ListIndex = mintBOOKMARK Else lstTOMatrl.ListIndex = mintBOOKMARK - 1 End If End If lstTOMatrl.SetFocus End Sub Private Sub cmdDelMat_Click() Dim strYN As String strYN = MsgBox("Are You Sure You Want To Delete?", vbCritical + vbYesNo, "Delete TO Material?") If strYN = vbNo Then Exit Sub End If mintBOOKMARK = lstTOMatrl.ListIndex moRSMat.Delete Call MatLoad cmdSaveMat.Enabled = False cmdDelMat.Enabled = False cmdDel1900.Enabled = False If Not mboolUPDATE Then cmdAddMat.Enabled = True End If If lstTOMatrl.ListCount > 0 Then If lstTOMatrl.ListCount > mintBOOKMARK Then lstTOMatrl.ListIndex = mintBOOKMARK Else lstTOMatrl.ListIndex = mintBOOKMARK - 1 End If End If lstTOMatrl.SetFocus mintBOOKMARK = 0 End Sub Private Sub cmdDelMeas_Click() Dim strYN As String strYN = MsgBox("Are You Sure You Want To Delete?", vbCritical + vbYesNo, "Delete Measurement?") If strYN = vbNo Then Exit Sub End If moRSMeas.Delete Call MeasLoad cmdSaveMeas.Enabled = False cmdDelMeas.Enabled = False cmdAddMeas.Enabled = True End Sub Private Sub cmdDelOptMat_Click() Dim strYN As String mintBOOKMARK = lstOptions.ListIndex mintBOOKMARK2 = lstOptMatrl.ListIndex strYN = MsgBox("Are You Sure You Want To Delete?", vbCritical + vbYesNo, "Delete Option Material?") If strYN = vbNo Then Exit Sub End If cmdAddOpt.Enabled = True cmdAddOptMat.Enabled = True cmdSaveOptMat.Enabled = False cmdDelOptMat.Enabled = False moRSOptMat.Delete lstOptions.Enabled = True Call OptLoad lstOptions.ListIndex = mintBOOKMARK If lstOptMatrl.ListCount > 0 Then If lstOptMatrl.ListCount > mintBOOKMARK2 Then lstOptMatrl.ListIndex = mintBOOKMARK2 Else lstOptMatrl.ListIndex = mintBOOKMARK2 - 1 End If Else lstOptMatrl.ListIndex = -1 End If mintBOOKMARK = 0 mintBOOKMARK2 = 0 End Sub Private Sub cmdDelOpt_Click() Dim strSQL As String Dim strYN As String mintBOOKMARK = lstOptions.ListIndex strYN = MsgBox("Are You Sure You Want To Delete?", vbCritical + vbYesNo, "Delete Option?") If strYN = vbNo Then Exit Sub End If On Error GoTo Error_EH cmdDelOpt.Enabled = False cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdAddOptMat.Enabled = True cmdCopyOpt.Enabled = False strSQL = "DELETE * FROM tblOptMatrl WHERE OPTid = " & gintOPTID goConn.Execute strSQL strSQL = "DELETE * FROM tblOption WHERE Optid = " & gintOPTID 'lstLOptions.ItemData(lstLOptions.ListIndex) goConn.Execute strSQL Call OptLoad If lstOptions.ListCount > 0 Then If lstOptions.ListCount > mintBOOKMARK Then lstOptions.ListIndex = mintBOOKMARK Else lstOptions.ListIndex = mintBOOKMARK - 1 End If Else lstOptions.ListIndex = -1 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdDelOpt_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdFindMat_Click() Dim oRS As Recordset Dim strSQL As String, lngFind As Long Dim strTYPE As String On Error GoTo Error_EH If Field2Str(txtMatInvNo) = "" Then txtMatInvNo = 1 End If If optInv(0) Then strSQL = "SELECT * from tblInvtry WHERE Inv_no = '" & txtMatInvNo.Text & "' AND Inv_Type = " & gbytINV_TYPE ElseIf optInv(1) Then strSQL = "SELECT * from tblInvTake WHERE Inv_no = '" & txtMatInvNo.Text & "' AND Inv_Type = " & gbytINV_TYPE & " and estimator = '" & gstrLOGIN & "'" End If ' strSQL = "SELECT * from tblInvtry WHERE Inv_no = " & txtMatInvNo.Text Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If oRS.RecordCount > 0 Then With oRS txtMatInvNo = Field2Str(!inv_no) txtMatDesc = Field2Str(!Desc) txtMetLength = Field2Integer(!calc_amt) txtMatPrice = Field2Str(!tprice) chkTransfer = vbUnchecked chkCalc = vbUnchecked If !d_flag = "S" Then cboDFlag.Text = "Supplier" Else cboDFlag.Text = "Yard" End If strTYPE = Field2Str(!m_type) Call FindType(cboMType, strTYPE) If !calc_flag = "M" Then cboMetal.Text = "Metal" Else cboMetal.Text = "None" End If End With txtMatQty.SetFocus Else lstMInventory.Visible = True Call LoadMInventory lngFind = Field2Long(txtMatInvNo) Call ListFindItem2(lstMInventory, lngFind) End If oRS.Close Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdFindMat_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdAddMeas_Click() cmdAddMeas.Enabled = False cmdSaveMeas.Enabled = True cmdDelMeas.Enabled = False cmdSave.Enabled = False cmdUpMeasCalc.Enabled = False mboolAdding = True Call MeasClear txtMeDesc.SetFocus End Sub Private Sub cmdMove_Click() 'This module allows you to copy a takeoff from the current active project 'to a new project that you will enter. You are prompted for the project code 'which is a code of 1 to 6 alpha charaters. The program then looks to make sure 'that it is a valid project and then copies all information for that takeoff Dim strPROJCODE As String, strSQL As String, strSQLL As String Dim oRS As Recordset, oRSS As Recordset On Error GoTo Error_EH ' mboolCopy = True strPROJCODE = InputBox("Enter the New Project Code for this Takeoff", "Copy to New Project") strPROJCODE = UCase(strPROJCODE) If strPROJCODE <> "" Then strSQL = "SELECT proj_id, proj_code, cont_id from tblProject WHERE Proj_Code = '" & strPROJCODE & " '" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If oRS.RecordCount <> 0 Then txtNewElv = lstMod_Elv.Text mintPROJID = oRS!Proj_ID strSQLL = "SELECT Toid, proj_id, pln_elv from tblTake WHERE not supersede and Proj_id = " & mintPROJID & " and pln_elv = '" & Field2Str(txtNewElv) & "'" Set oRSS = New Recordset oRSS.Open strSQLL, goConn, adOpenForwardOnly, adLockReadOnly If oRSS.RecordCount <> 0 Then MsgBox "The Project you entered already has this Model/Elevation. Verify Project or Select a different Model/Elevation", vbOKOnly, "Duplicate Model/Elevation" cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdDelOpt.Enabled = False cmdCopyOpt.Enabled = False cmdAddOptMat.Enabled = True Exit Sub Else ' txtNewElv = lstMod_Elv.Text(lstMod_Elv.ListIndex) mintPROJID = oRS!Proj_ID mboolMove = True Call cmdSave_Click End If Else MsgBox "The Project Code you entered is not valid. Verify the Project Code and try again!", vbOKOnly, "Invalid Project Code" cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdDelOpt.Enabled = False cmdCopyOpt.Enabled = False cmdAddOptMat.Enabled = True Exit Sub End If Else Exit Sub End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdMove_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdPrintAllIncrease_Click() Dim strSQL As String Dim oRS As Recordset Dim strSELECT As String On Error GoTo Error_EH gboolPRINT = True If gboolPRINT Then strSELECT = "SELECT * FROM tblTake WHERE not supersede and proj_id = " & gintPROJID & " ORDER BY pln_elv" Set oRS = New Recordset oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly Do Until oRS.EOF strSQL = "{tblTake.toid} = " & oRS!toid crTake.ReportFileName = App.Path & "\takeoffAdj.rpt" crTake.SelectionFormula = strSQL ' crTake.Destination = crptToWindow crTake.Destination = crptToPrinter crTake.Action = 1 oRS.MoveNext Loop gboolPRINT = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdPrintAllTake_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdPrintIncrease_Click() Dim strDate As String, strSQL As String, intSUP As Integer Dim oRS As Recordset Dim strSELECT As String On Error GoTo Error_EH gboolPRINT = True If gboolPRINT Then strSQL = "{tblTake.toid} = " & gintTOID crTake.ReportFileName = App.Path & "\takeoffAdj.rpt" crTake.SelectionFormula = strSQL ' crTake.Destination = crptToWindow crTake.Destination = crptToPrinter crTake.Action = 1 gboolPRINT = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdPrintIncrease_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdPrintTake_Click() Dim strDate As String, strSQL As String, intSUP As Integer Dim oRS As Recordset, intYN As Integer Dim strSELECT As String On Error GoTo Error_EH gboolPRINT = True ' gstrFLAG = "B" ' gstrTYPE = "S" ' Call ShowPrint If gboolPRINT Then ' strSELECT = "SELECT * FROM tblOrders WHERE lot_id = " & gintLOTID & " and m_type = 'B'" ' Set oRS = New Recordset ' oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly ' moRS!forder = Field2Str(oRS!order_date) ' moRS.Update strSQL = "{tblTake.toid} = " & gintTOID ' strSQL = strSQL & " and {tblORDERS.d_flag} = 'S' and {tblORDERS.m_type} = 'B'" crTake.ReportFileName = App.Path & "\takeoff.rpt" crTake.SelectionFormula = strSQL intYN = MsgBox("Do You Want To Print To Printer?", vbYesNo, "Printer or Window") If intYN = vbNo Then crTake.Destination = crptToWindow ElseIf intYN = vbYes Then crTake.Destination = crptToPrinter End If crTake.Action = 1 gboolPRINT = False ' cmdBrownPrint.Enabled = False ' Call Form_Load End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdPrintTake_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdPrintAllTake_Click() Dim strSQL As String, intYN As Integer Dim oRS As Recordset Dim strSELECT As String On Error GoTo Error_EH gboolPRINT = True If gboolPRINT Then strSELECT = "SELECT * FROM tblTake WHERE not supersede and proj_id = " & gintPROJID & " ORDER BY pln_elv" Set oRS = New Recordset oRS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly intYN = MsgBox("Do You Want To Print To Printer?", vbYesNo, "Printer or Window") If intYN = vbNo Then crTake.Destination = crptToWindow ElseIf intYN = vbYes Then crTake.Destination = crptToPrinter End If Do Until oRS.EOF strSQL = "{tblTake.toid} = " & oRS!toid crTake.ReportFileName = App.Path & "\takeoff.rpt" crTake.SelectionFormula = strSQL crTake.Action = 1 oRS.MoveNext Loop gboolPRINT = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdPrintAllTake_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdSaveMat_Click() Dim intSAVE As Integer intSAVE = lstTOMatrl.ListIndex mboolSETUP = False mboolENTER = False cmdSave.Enabled = True cmdSaveMat.Enabled = False cmdAddMat.Enabled = True ' cmdFindMat.Visible = False ' cmdSetup.Enabled = False lstMInventory.Visible = False If Field2Str2(txtMatInvNo) <> 0 Then Call MatSave End If Call MatLoad lstTOMatrl.ListIndex = intSAVE lstTOMatrl.SetFocus End Sub Private Sub cmdSaveMeas_Click() cmdSaveMeas.Enabled = False cmdSave.Enabled = True cmdAddMeas.Enabled = True cmdDelMeas.Enabled = False cmdUpMeasCalc.Enabled = True Call MeasSave Call MeasLoad Call cmdUpMeasCalc_Click lstMeasure.SetFocus End Sub Private Sub cmdSaveOpt_Click() Dim intSAVE As Integer, strINDEX As String intSAVE = lstOptions.ListIndex strINDEX = txtODesc cmdSaveOpt.Enabled = False cmdSave.Enabled = True cmdCopyOpt.Enabled = False cmdDelOpt.Enabled = False cmdAddOpt.Enabled = True cmdAddOptMat.Enabled = True Call OptSave Call OptLoad lstMod_Elv.Enabled = True lstOptions.ListIndex = intSAVE Call CBFindString(lstOptions, strINDEX) End Sub Private Sub OptSave() Dim oRSMAX As Recordset Dim oRS As Recordset Dim strSQL As String On Error GoTo Error_EH If moRSOpt.State = adStateClosed Then strSQL = "SELECT * FROM tblOption WHERE toid = 1" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic oRS.AddNew oRS!toid = gintTOID oRS!yards = Integer2Field(txtOYdge) oRS!Desc = Str2Field(txtODesc) oRS!fin2 = Integer2Field(txtOFin2) oRS!f_adj = Integer2Field(txtOFAdj) oRS!price = Str2Field(txtOBAmt) oRS!notes = Str2Field(txtNote) oRS!ostone = chkOStone oRS!OSt_SqFt = Integer2Field(txtOST_SqFt) oRS!otstone = chkST_Others oRS!invoice = chkNoInvoice oRS!Scaf6 = Integer2Field(txtO68) oRS!scaf10 = Integer2Field(txtO108) Call FindTexture(cboOFinish, strTYPE) oRS!texture = strTYPE oRS.Update Call OptLoad If mboolAdding Then mboolAdding = False End If Exit Sub End If If mboolAdding Then moRSOpt.AddNew End If If mboolCopy Then moRSOpt.AddNew moRSOpt!toid = mintTOID Else moRSOpt!toid = gintTOID End If moRSOpt!yards = Integer2Field(txtOYdge.Text) moRSOpt!Desc = Str2Field(txtODesc.Text) moRSOpt!fin2 = Integer2Field(txtOFin2.Text) moRSOpt!f_adj = Integer2Field(txtOFAdj.Text) moRSOpt!price = Str2Field(txtOBAmt) moRSOpt!notes = Str2Field(txtNote) moRSOpt!ostone = chkOStone moRSOpt!otstone = chkST_Others moRSOpt!invoice = chkNoInvoice moRSOpt!Scaf6 = Integer2Field(txtO68) moRSOpt!scaf10 = Integer2Field(txtO108) moRSOpt!OSt_SqFt = Integer2Field(txtOST_SqFt) Call FindTexture(cboOFinish, strTYPE) moRSOpt!texture = strTYPE moRSOpt.Update strSQL = "SELECT Max(OPTID) as MAXOptid from tblOption" Set oRSMAX = New Recordset oRSMAX.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly mintOPTID = oRSMAX!maxoptid oRSMAX.Close If mboolAdding Then mboolAdding = False End If If mboolCopy Then Call CopyOptMat mboolCopy = False End If Exit Sub Error_EH: Call ErrorHandler(moRSOpt.ActiveConnection) Exit Sub End Sub Private Sub CopyOptMat() Dim oRS As Recordset Dim strSQL As String On Error GoTo Error_EH strSQL = "Select * from tblOptMatrl where OPTID = " & gintOPTID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly Do Until oRS.EOF If mboolCopy Then moRSOptMat.AddNew End If With oRS moRSOptMat!OPTID = mintOPTID moRSOptMat!inv_no = Field2Str(!inv_no) moRSOptMat!Desc = Field2Str(!Desc) moRSOptMat!qty = Field2Str(!qty) moRSOptMat!calc_amt = Field2Integer(!calc_amt) moRSOptMat!d_flag = Field2Str(!d_flag) moRSOptMat!m_type = Field2Str(!m_type) moRSOptMat!calc_flag = Field2Str(!calc_flag) moRSOptMat.Update End With oRS.MoveNext Loop If mboolAdding Then mboolAdding = False End If oRS.Close Exit Sub Error_EH: Call ErrorHandler(moRSOptMat.ActiveConnection) Exit Sub End Sub Private Sub OptMatSave() Dim oRS As Recordset Dim strSQL As String On Error GoTo Error_EH If moRSOptMat.State = adStateClosed Then strSQL = "SELECT * FROM tblOptMatrl WHERE optid = 1" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic oRS.AddNew oRS!toid = gintTOID oRS!OPTID = gintOPTID oRS!inv_no = Str2Field(txtOMInvNo) oRS!Desc = Str2Field(txtOMDesc) oRS!qty = Str2Field(txtOMQty) oRS!calc_amt = Integer2Field(txtOMMetL) oRS!price = Str2Field(txtOMPrice) If cboOMDFlag.Text = "Supplier" Then oRS!d_flag = "S" ElseIf cboOMDFlag.Text = "Yard" Then oRS!d_flag = "Y" End If oRS!m_type = Left$(cboOMType.Text, 1) If cboOMMetal.Text = "Metal" Then oRS!calc_flag = "M" ElseIf cboOMMetal.Text = "None" Then oRS!calc_flag = "" End If oRS.Update If mboolAdding Then mboolAdding = False End If Exit Sub End If If mboolAdding Then moRSOptMat.AddNew End If moRSOptMat!OPTID = gintOPTID moRSOptMat!toid = gintTOID moRSOptMat!inv_no = Str2Field(txtOMInvNo) moRSOptMat!Desc = Str2Field(txtOMDesc) moRSOptMat!qty = Str2Field(txtOMQty) moRSOptMat!calc_amt = Integer2Field(txtOMMetL) moRSOptMat!price = Str2Field(txtOMPrice) If cboOMDFlag.Text = "Supplier" Then moRSOptMat!d_flag = "S" ElseIf cboOMDFlag.Text = "Yard" Then moRSOptMat!d_flag = "Y" End If moRSOptMat!m_type = Left$(cboOMType.Text, 1) If cboOMMetal.Text = "Metal" Then moRSOptMat!calc_flag = "M" ElseIf cboOMMetal.Text = "None" Then moRSOptMat!calc_flag = "" End If moRSOptMat.Update If mboolAdding Then mboolAdding = False End If Exit Sub Error_EH: Call ErrorHandler(moRSOptMat.ActiveConnection) Exit Sub End Sub Private Sub cmdSaveOptMat_Click() Dim intSAVE As Integer, intSAVE2 As Integer intSAVE = lstOptions.ListIndex intSAVE2 = lstOptMatrl.ListIndex cmdAddOptMat.Enabled = True cmdAddOpt.Enabled = True lstOptions.Visible = True lstInventory.Visible = False cmdSaveOptMat.Enabled = False cmdSaveOpt.Enabled = False cmdSave.Enabled = True cmdDelOptMat.Enabled = False Call OptMatSave Call OptLoad lstMod_Elv.Enabled = True lstOptions.Enabled = True lstOptions.ListIndex = intSAVE lstOptMatrl.ListIndex = intSAVE2 lstOptMatrl.SetFocus End Sub Private Sub cmdSetup_Click() Dim intSAVE As Integer If cmdSetup.Caption = "Setup Materials &On" Then cmdSetup.Caption = "Setup Materials &Off" lstMod_Elv.Enabled = False lstTOMatrl.Enabled = False mboolSETUP = True mboolENTER = True cmdAddMat.Enabled = False cmdSave.Enabled = False cmdSaveMat.Enabled = False cmdDelMat.Enabled = False cmdDel1900.Enabled = False cmdUpdate.Enabled = False cmdCopy.Enabled = False cmdPrintTake.Enabled = False cmdPrintAllTake.Enabled = False cmdUPLabRates.Enabled = False cmdUPInvPrices.Enabled = False cmdExit.Enabled = False cmdChgLabRates.Enabled = False cmdNew.Enabled = False cboOneKote.Enabled = False cmdDeleteTakeoff.Enabled = False mboolAdding = True Call MatClear lstMInventory.Visible = True Call LoadMInventory lstMInventory.ListIndex = 0 lstMInventory.SetFocus Exit Sub End If If cmdSetup.Caption = "Setup Materials &Off" Then cmdSetup.Caption = "Setup Materials &On" lstMod_Elv.Enabled = True lstTOMatrl.Enabled = True cmdUpdate.Enabled = True intSAVE = lstTOMatrl.ListIndex mboolSETUP = False mboolENTER = False cmdAddMat.Enabled = True cmdSaveMat.Enabled = False cmdDelMat.Enabled = True cmdDel1900.Enabled = True cmdCopy.Enabled = True cmdPrintTake.Enabled = True cmdPrintAllTake.Enabled = True cmdUPLabRates.Enabled = True cmdUPInvPrices.Enabled = True cmdExit.Enabled = True cmdChgLabRates.Enabled = True cmdNew.Enabled = True cboOneKote.Enabled = True mboolAdding = False lstMInventory.Visible = False ' cmdSave.Enabled = True If Field2Str2(txtMatInvNo) <> 0 Then Call MatSave End If Call MatLoad lstTOMatrl.ListIndex = intSAVE lstTOMatrl.SetFocus ' lstMInventory.SetFocus Exit Sub End If End Sub Private Sub cmdUpdate_Click() Dim intSAVE As Integer If cmdUpdate.Caption = "Update &Materials On" Then cmdUpdate.Caption = "Update &Materials Off" lstMod_Elv.Enabled = False ' lstTOMatrl.Enabled = False cmdSetup.Enabled = False mboolUPDATE = True mboolENTER = True cmdAddMat.Enabled = False cmdSave.Enabled = False cmdSaveMat.Enabled = False cmdDelMat.Enabled = False cmdDel1900.Enabled = False cmdCopy.Enabled = False cmdPrintTake.Enabled = False cmdPrintAllTake.Enabled = False cmdUPLabRates.Enabled = False cmdUPInvPrices.Enabled = False cmdExit.Enabled = False cmdChgLabRates.Enabled = False cmdNew.Enabled = False cboOneKote.Enabled = False cmdDeleteTakeoff.Enabled = False lstTOMatrl.SetFocus Exit Sub End If If cmdUpdate.Caption = "Update &Materials Off" Then cmdUpdate.Caption = "Update &Materials On" lstMod_Elv.Enabled = True cmdSetup.Enabled = True intSAVE = lstTOMatrl.ListIndex mboolUPDATE = False mboolENTER = False cmdAddMat.Enabled = True cmdSaveMat.Enabled = False cmdDelMat.Enabled = True cmdDel1900.Enabled = True cmdCopy.Enabled = True cmdPrintTake.Enabled = True cmdPrintAllTake.Enabled = True cmdUPLabRates.Enabled = True cmdUPInvPrices.Enabled = True cmdExit.Enabled = True cmdChgLabRates.Enabled = True cmdNew.Enabled = True cboOneKote.Enabled = True mboolAdding = False ' cmdSave.Enabled = Call MatLoad lstTOMatrl.ListIndex = intSAVE lstTOMatrl.SetFocus Exit Sub End If End Sub Private Sub cmdUPInvPrices_Click() Dim strSQL As String, strSELECT As String, strFIND As String Dim oRS As Recordset, oRSS As Recordset On Error GoTo Error_EH ' strSQL = "SELECT inv_no, tprice FROM tblInvtry ORDER BY Inv_no" strSQL = "SELECT inv_no, tprice FROM tblInvtry WHERE Inv_Type = " & moRSProj!inv_type & " ORDER BY Inv_no" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic strSELECT = "SELECT toid, inv_no, price from tblTOMatrl where toid = " & gintTOID Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenKeyset, adLockOptimistic Do Until oRSS.EOF oRS.MoveFirst strFIND = "inv_no = '" & Field2Str(oRSS!inv_no) & "'" oRS.Find strFIND If Not oRS.EOF Then oRSS!price = Field2Str(oRS!tprice) oRSS.Update End If oRSS.MoveNext Loop strSELECT = "SELECT toid, optid, inv_no, price from tblOptMatrl where toid = " & gintTOID Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenKeyset, adLockOptimistic Do Until oRSS.EOF oRS.MoveFirst strFIND = "inv_no = '" & Field2Str(oRSS!inv_no) & "'" oRS.Find strFIND If Not oRS.EOF Then oRSS!price = Field2Str2(oRS!tprice) oRSS.Update End If oRSS.MoveNext Loop Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdUPInvPrices_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdUPLabRates_Click() On Error GoTo Error_EH If optPTex(3) Then mstrFINISH = "SK" ElseIf optPTex(4) Then mstrFINISH = "DA" ElseIf optPTex(0) Then mstrFINISH = "SA" ElseIf optPTex(9) Then mstrFINISH = "SB" ElseIf optPTex(1) Then mstrFINISH = "S2" ElseIf optPTex(2) Then mstrFINISH = "S3" ElseIf optPTex(8) Then mstrFINISH = "DF" ElseIf optPTex(5) Then mstrFINISH = "SM" ElseIf optPTex(7) Then mstrFINISH = "QU" ElseIf optPTex(6) Then mstrFINISH = "MN" ElseIf optPTex(10) Then mstrFINISH = "MF" End If Call GetLabor Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdUPLabRates_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub lstMeasure_DblClick() cmdSaveMeas.Enabled = True cmdAddMeas.Enabled = False cmdDelMeas.Enabled = True cmdUpMeasCalc.Enabled = False txtMeSqFt.SetFocus End Sub Private Sub lstMInventory_DblClick() Dim oRS As Recordset, strINVNO As String Dim strSQL As String, strTYPE As String On Error GoTo Error_EH lstMInventory.col = 0 strINVNO = lstMInventory.ColText If mboolSETUP Then mboolENTER = True End If If optInv(0) Then ' strSQL = "SELECT * from tblInvtry WHERE Inv_no = " & txtMatInvNo.Text strSQL = "SELECT Inv_no, Desc, D_Flag, M_Type, Calc_Flag, Calc_Amt, tprice from tblInvtry where inv_no = '" & strINVNO & "'" ElseIf optInv(1) Then ' strSQL = "SELECT * from tblInvTake WHERE Inv_no = " & txtMatInvNo.Text & " and estimator = '" & gstrLOGIN & "'" strSQL = "SELECT * from tblInvTake where Inv_No = '" & strINVNO & "' and estimator = '" & gstrLOGIN & "'" End If ' strSQL = "SELECT Inv_no, Desc, D_Flag, M_Type, Calc_Flag, Calc_Amt, tprice from tblInvtry where Inv_no = " & lstMInventory.ItemData(lstMInventory.ListIndex) Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly With oRS txtMatInvNo = Field2Str(!inv_no) txtMatDesc = Field2Str(!Desc) txtMetLength = Field2Integer(!calc_amt) txtMatPrice = Field2Str(!tprice) chkTransfer = vbUnchecked chkCalc = vbUnchecked If !d_flag = "S" Then cboDFlag.Text = "Supplier" Else cboDFlag.Text = "Yard" End If strTYPE = Field2Str(!m_type) Call FindType(cboMType, strTYPE) If !calc_flag = "M" Then cboMetal.Text = "Metal" Else cboMetal.Text = "None" End If End With oRS.Close txtMatQty.SetFocus If Not mboolSETUP Then lstMInventory.Visible = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module lstMInventory_DblClick" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub LoadMInventory() Dim oRS As Recordset Dim strSQL As String Dim strLine As String '*** FIX On Error GoTo Error_EH If optInv(0) Then strSQL = "SELECT Inv_no, Desc from tblInvtry WHERE Inv_Type = " & gbytINV_TYPE ElseIf optInv(1) Then strSQL = "SELECT Inv_no, Desc FROM tblInvTake WHERE Inv_Type = " & gbytINV_TYPE & " AND estimator = '" & gstrLOGIN & "'" End If Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstMInventory.Clear Do Until oRS.EOF With lstMInventory strLine = oRS!inv_no & vbTab & oRS!Desc .AddItem strLine ' .ItemData(.NewIndex) = oRS!inv_no End With oRS.MoveNext Loop oRS.Close If lstMInventory.ListCount Then lstMInventory.ListIndex = -1 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module LoadMInventory" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdFindOptMat_Click() Dim oRS As Recordset Dim strSQL As String, lngFind As Long Dim strTYPE As String On Error GoTo Error_EH If Len(txtOMInvNo) = 0 Then txtOMInvNo = 1 End If If optInv(0) Then strSQL = "SELECT * from tblInvtry WHERE Inv_no = '" & txtOMInvNo.Text & "' AND INV_TYPE = " & gbytINV_TYPE ElseIf optInv(1) Then strSQL = "SELECT * from tblInvTake WHERE Inv_no = '" & txtOMInvNo.Text & "' AND INV_TYPE = " & gbytINV_TYPE & " and estimator = '" & gstrLOGIN & "'" End If ' strSQL = "SELECT * from tblInvtry WHERE Inv_no = " & txtOMInvNo.Text Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly If oRS.RecordCount > 0 Then With oRS txtOMInvNo = Field2Str(!inv_no) txtOMDesc = Field2Str(!Desc) txtOMMetL = Field2Integer(!calc_amt) txtOMPrice = Field2Str(!tprice) If !d_flag = "S" Then cboOMDFlag.Text = "Supplier" Else cboOMDFlag.Text = "Yard" End If strTYPE = Field2Str(!m_type) Call FindType(cboOMType, strTYPE) If !calc_flag = "M" Then cboOMMetal.Text = "Metal" Else cboOMMetal.Text = "None" End If End With txtOMQty.SetFocus Else lstOptions.Visible = False lstInventory.Visible = True Call LoadOInventory lngFind = Field2Long(txtOMInvNo) Call ListFindItem2(lstInventory, lngFind) End If oRS.Close Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdFindOptMat_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub LoadOInventory() Dim oRS As Recordset Dim strSQL As String Dim strLine As String On Error GoTo Error_EH If optInv(0) Then strSQL = "SELECT Inv_no, Desc from tblInvtry WHERE Inv_Type = " & gbytINV_TYPE ElseIf optInv(1) Then strSQL = "SELECT Inv_no, Desc FROM tblInvTake WHERE Inv_Type = " & gbytINV_TYPE & " AND estimator = '" & gstrLOGIN & "'" End If ' strSQL = "SELECT Inv_no, Desc from tblInvtry" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstInventory.Clear Do Until oRS.EOF With lstInventory strLine = oRS!inv_no & vbTab & oRS!Desc .AddItem strLine .ItemData(.NewIndex) = oRS!inv_no End With oRS.MoveNext Loop oRS.Close If lstInventory.ListCount Then lstInventory.ListIndex = -1 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module LoadOInventory" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub lstInventory_DblClick() Dim oRS As Recordset Dim strSQL As String, strTYPE As String On Error GoTo Error_EH strSQL = "SELECT Inv_no, Desc, D_Flag, M_Type, Calc_Flag, Calc_Amt, TPrice from tblInvtry where Inv_no = '" & lstInventory.ItemData(lstInventory.ListIndex) & "' AND Inv_Type = " & gbytINV_TYPE Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly With oRS txtOMInvNo = Field2Str(!inv_no) txtOMDesc = Field2Str(!Desc) txtOMMetL = Field2Integer(!calc_amt) txtOMPrice = Field2Str(!tprice) If !d_flag = "S" Then cboOMDFlag.Text = "Supplier" Else cboOMDFlag.Text = "Yard" End If strTYPE = Field2Str(!m_type) Call FindType(cboOMType, strTYPE) If !calc_flag = "M" Then cboOMMetal.Text = "Metal" Else cboOMMetal.Text = "None" End If End With oRS.Close lstInventory.Visible = False lstOptions.Visible = True Exit Sub Error_EH: gstrMODULE = "Form Take - Module lstInventory_DblClick" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub Form_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then If mboolSETUP Then If mboolENTER Then Call lstMInventory_DblClick KeyAscii = 0 mboolENTER = False Else SendKeys "{TAB}" KeyAscii = 0 End If ElseIf mboolUPDATE Then If mboolENTER Then txtMatQty.SetFocus ' Call lstMInventory_DblClick KeyAscii = 0 mboolENTER = False Else SendKeys "{TAB}" KeyAscii = 0 End If Else SendKeys "{TAB}" KeyAscii = 0 End If End If End Sub Private Sub cmdDeleteTakeoff_Click() Dim strDELETE As String Dim strYN As String strYN = MsgBox("Are You Sure You Want To Delete?", vbCritical + vbYesNo, "Delete?") If strYN = vbNo Then Exit Sub End If On Error GoTo Error_EH mintBOOKMARK = lstMod_Elv.ListIndex strDELETE = "DELETE * FROM tblOptMatrl WHERE toid = " & gintTOID goConn.Execute strDELETE strDELETE = "DELETE * FROM tblOption WHERE toid = " & gintTOID goConn.Execute strDELETE strDELETE = "DELETE * FROM tblTOMatrl WHERE toid = " & gintTOID goConn.Execute strDELETE strDELETE = "DELETE * FROM tblmeasure WHERE toid = " & gintTOID goConn.Execute strDELETE strDELETE = "DELETE * FROM tblTOLabor WHERE toid = " & gintTOID goConn.Execute strDELETE moRS.Delete Call ListLoad If lstMod_Elv.ListCount > 0 Then If lstMod_Elv.ListCount > mintBOOKMARK Then lstMod_Elv.ListIndex = mintBOOKMARK Else lstMod_Elv.ListIndex = -1 End If Else Unload Me End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdDeleteTakeoff_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdUpMeasCalc_Click() Dim oRS As Recordset Dim strSQL As String, intSQYD As Long, intTTLFeet As Long On Error GoTo Error_EH intSQYD = 0 intTTLFeet = 0 strSQL = "SELECT sum(SQ_YDS) as TTLFt FROM tblmeasure WHERE toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, _ adOpenForwardOnly, adLockReadOnly 'Do Until oRS.EOF intTTLFeet = Field2Str2(oRS!ttlft) ' oRS.MoveNext ' Loop If intTTLFeet <> 0 Then intSQYD = Int((intTTLFeet / 9) + 0.99) txtTTLYds.Text = intSQYD txtLathYds = Int((txtTTLYds - (((Field2Integer(txtOpenings)) * (Field2Integer(txtPrcntge))) / 100)) + 0.99) txtStuccoYds = Field2Long(txtLathYds) - 5 End If oRS.Close Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdUpMeasCalc_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub Form_Load() Set moRS = New Recordset Set moRSProj = New Recordset Set moRSMeas = New Recordset Set moRSMat = New Recordset Set moRSOpt = New Recordset Set moRSOptMat = New Recordset Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 Call MTypeLoad(cboOMType) Call MTypeLoad(cboMType) Call ProjLoad Call TextureLoad Call StuccoLoad Call MeLocateLoad Call ListLoad tabTake.Tab = 3 mintBOOKMARK = 0 If moRSProj!BagSand Then lblSand = "Sand Bags:" Else lblSand = "Sand Tons:" End If End Sub Private Sub SecondLoad() Dim strSQL As String Dim oRS As Recordset On Error GoTo Error_EH strSQL = "SELECT texture, bidprice FROM tblTOLabor WHERE toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly Do Until oRS.EOF If oRS!texture = "SK" Then chkSkip = vbChecked txtSkipPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "SA" Then chkSand = vbChecked txtSandPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "S2" Then chkSand = vbChecked txtSandPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "S3" Then chkSand = vbChecked txtSandPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "SB" Then chkSB = vbChecked txtSBPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "DA" Then chkDash = vbChecked txtDashPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "MN" Then chkMonterrey = vbChecked txtMonterreyPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "SM" Then chkSmooth = vbChecked txtSmoothPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "QU" Then chkQU = vbChecked txtQUPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "DF" Then chkDF = vbChecked txtDFPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "MF" Then chkMF = vbChecked txtMFPr = Format(Field2Double(oRS!bidprice), "###,###") ElseIf oRS!texture = "SS" Then chkSS = vbChecked txtSS = Format(Field2Double(oRS!bidprice), "###,###") End If oRS.MoveNext Loop Exit Sub Error_EH: gstrMODULE = "Form Take - Module ProjLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub ProjLoad() Dim strSQL As String On Error GoTo Error_EH strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID moRSProj.Open strSQL, goConn, _ adOpenForwardOnly, adLockReadOnly mstrWIRE = Field2Str(moRSProj!wire) gbytINV_TYPE = Field2Str(moRSProj!inv_type) Exit Sub Error_EH: gstrMODULE = "Form Take - Module ProjLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub TextureLoad() Dim oRSFinish As Recordset Dim strSQL As String, intRows As Integer Dim row, col As Long On Error GoTo Error_EH strSQL = "SELECT AUTOID, Desc FROM tblFinish" Set oRSFinish = New Recordset oRSFinish.Open strSQL, goConn, _ adOpenForwardOnly, adLockReadOnly oRSFinish.MoveLast oRSFinish.MoveFirst intRows = oRSFinish.RecordCount Do Until oRSFinish.EOF cboOFinish.AddItem oRSFinish("Desc") cboOFinish.ItemData(cboOFinish.NewIndex) = Field2Long(oRSFinish("AUTOID")) oRSFinish.MoveNext Loop oRSFinish.Close Exit Sub Error_EH: gstrMODULE = "Form Take - Module TextureLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub ListLoad() Dim oRS As Recordset Dim strSQL As String, strProj As String On Error GoTo Error_EH strSQL = "SELECT TOID, Pln_Elv from tblTake WHERE not supersede and Proj_ID = " & gintPROJID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstMod_Elv.Clear Do Until oRS.EOF With lstMod_Elv .AddItem Field2Str(oRS!pln_elv) .ItemData(.NewIndex) = oRS("toid") End With oRS.MoveNext Loop oRS.Close If lstMod_Elv.ListCount Then lstMod_Elv.ListIndex = 0 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module ListLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub ClearSecond() chkSkip = vbUnchecked txtSkipPr = "" chkSand = vbUnchecked txtSandPr = "" chkSB = vbUnchecked txtSBPr = "" chkDash = vbUnchecked txtDashPr = "" chkMonterrey = vbUnchecked txtMonterreyPr = "" chkSmooth = vbUnchecked txtSmoothPr = "" chkQU = vbUnchecked txtQUPr = "" chkDF = vbUnchecked txtDFPr = "" chkSS = vbUnchecked txtSS = "" chkMF = vbUnchecked txtMFPr = "" End Sub Private Sub FormShow() Dim dblOPENINGS As Double, strSELECT As String Dim dblSplitCost As Double On Error GoTo Error_EH Call ClearSecond ' If moRS!origTOID <> 0 Then If moRS!toid <> moRS!origTOID Then lblSupercede.Visible = True Else lblSupercede.Visible = False End If ' End If mboolSHOW = True gintTOID = moRS!toid txtProject = Trim$(moRSProj!Proj_Code) & " " & moRSProj!Proj_Desc With moRS mstrFINISH = Field2Str(!finish) chkOpen = Field2CheckBox(!openflg) txtTTLYds = Field2Str2(!TTL_Yds) txtOpenings = Format(Field2Str2(!opening), "#,#") txtPrcntge = Field2Integer(!openpr) ' If Field2Integer(!lath_yds) = 0 Then If Field2Long(!lath_yds) = 0 Then txtLathYds = Int((Field2Str2(txtTTLYds) - (((Field2Str2(txtOpenings)) * (Field2Str2(txtPrcntge))) / 100)) + 0.99) Else txtLathYds = Field2Str(!lath_yds) End If txtLathYds = Format(Field2Double(txtLathYds), "###,###") txtCMUYds = Field2Str2(!CMUYDS) txtStone = Field2Str2(!ST_SQFT) chkStone = Field2CheckBox(!stone) txtNotes = Field2Str(!notes) txtFoamAdj = Field2Integer(!f_adj) txtLaborAdj = Field2Integer(!l_adj) txtStoneAdj = Field2Integer(!st_adj) txtWireAdj = Field2Integer(!w_adj) mdblBrnLab = Field2Str2(!brn_lab) mdblTexLab = Field2Str2(!tex_lab) txtFin2 = Field2Integer(!fin2) txtSandTons = Field2Integer(!SAND_TONS) txtSandPrice = Format(Field2Str(!sand), "##.00") txtMetalFt = Format(Field2Str2(!METAL), "#,#") txtStucLab = Format(Field2Str2(!pl), "#,#") txtLathLab = Format(Field2Str2(!ll), "#,#") txtMetLab = Format(Field2Str2(!mlab), "#,#") txtMisc = Format(Field2Str2(!MISC), "#,#") txtMatMU = Format(Field2Str(!MATMUPR), "#,#") txtBidPrwCMU = Format(Field2Double(!bidp), "###,###") txtCMUPrice = Format(Field2Long(!cmulab), "###,###") txtBidPrice = Format((Field2Double(txtBidPrwCMU) - Field2Double(txtCMUPrice)), "###,###") txtTtlCost = Format(Field2Double(!BIDC), "###,###") txtTtlMU = Format(Field2Str(!OH), "#,#") txtOH = Format(Field2Str2(!OHPR), "##,###") chk2Story = Field2CheckBox(!twostory) If chk2Story Then lbl2S.Caption = "2S" Else lbl2S.Caption = "" End If txt68 = Field2Str2(!Scaf6) txt108 = Field2Str2(!scaf10) txtCreated = Format(Field2Str(!Create), "mm/dd/yyyy") & " - " & Field2Str(!createuser) txtCreated = txtCreated & " " & Format(Field2Str(!LSave), "mm/dd/yyyy") & " - " & Field2Str(!LSUser) txtCreated = txtCreated & " " & Format(Field2Str(!Update), "mm/dd/yyyy") & " - " & Field2Str(!LUUser) ' txtUpdate = Format(Field2Str(!Update), "mm/dd/yyyy") & " - " & Field2Str(!LUUser) ' txtLSave = Format(Field2Str(!LSave), "mm/dd/yyyy") & " - " & Field2Str(!LSUser) If Not moRSProj!BagSand Then If Field2Integer(txtSandTons) < 16 Then dblSplitCost = Field2Str2(moRSProj!splitcst) txtSandAmt = Format((Field2Str(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") txtSandAmt = Field2Str2(txtSandAmt) + dblSplitCost ' txtSandAmt = Field2Str2(txtSandAmt) + 40 Else txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") End If Else txtSandAmt = Format((Field2Str2(txtSandTons.Text) * Field2Str2(txtSandPrice.Text)), "##,###") End If txtScafGas = Format(Field2Str2(!SL_TG), "#,#") txtTape = Format(Field2Str(!tp), "##.00") txtTtlMat = Format(Field2Str2(!MATCOST), "###,###") txtLabBur = Format(Field2Str2(!BRDN), "##,###") ' txtSLRate = Format(Field2Str(!sr), "##.00") ' txtLLRate = Format(Field2Str(!lr), "##.00") ' txtMLRate = Format(Field2Str(!mr), "##.00") ' txtMatMURate = Format(Field2Str(!mtmu), "percent") ' txtSGRate = Format(Field2Str(!scr), "##.00") ' txtTPRate = Format(Field2Str(!tp), "##.00") ' txtMURate = Format(Field2Str(!mu), "percent") ' txtOHRate = Format(Field2Str(!ohp), "##.00") ' txtCMURate = Format(Field2Str(!cr), "##.00") txtTape = Format(Field2Str2(!TPE), "###,###") If Field2Str2(txtLathYds) <> 0 Then txtStuccoYds = Format((Field2Str2(txtLathYds) - 5), "##,###") Else txtStuccoYds = "" End If If !finish = "SK" Then txtFinish.Text = "SKIP TROWEL" optPTex(3).Value = True ElseIf !finish = "SA" Then txtFinish.Text = "Sand - 16" optPTex(0).Value = True ElseIf !finish = "SB" Then txtFinish.Text = "EIFS - SANDBLAST" optPTex(9).Value = True ElseIf !finish = "S2" Then txtFinish.Text = "Sand - 20" optPTex(1).Value = True ElseIf !finish = "S3" Then txtFinish.Text = "Sand - 30" optPTex(2).Value = True ElseIf !finish = "DA" Then txtFinish.Text = "Dash" optPTex(4).Value = True ElseIf !finish = "DF" Then txtFinish.Text = "Skip and Sand Finish" optPTex(8).Value = True ElseIf !finish = "SM" Then txtFinish.Text = "Smooth" optPTex(5).Value = True ElseIf !finish = "QU" Then txtFinish.Text = "Quernavaca" optPTex(7).Value = True ElseIf !finish = "MN" Then txtFinish.Text = "Monterrey" optPTex(6).Value = True ElseIf !finish = "MF" Then txtFinish.Text = "Monterrey & Sand" optPTex(10).Value = True ElseIf !finish = "SS" Then txtFinish.Text = "Skip and R Sand Finish" optPTex(11).Value = True End If ' On Error Resume Next If !stype = "S" Then cboOneKote = "Superwall" ElseIf !stype = "M" Then cboOneKote = "Magna Wall" ElseIf !stype = "T" Then cboOneKote = "Three Coat" ElseIf !stype = "N" Then cboOneKote = "Synthetic" ElseIf !stype = "B" Then cboOneKote = "Synthetic over 1 Kote" ElseIf !stype = "W" Then cboOneKote = "Western 1 Kote" End If ' On Error GoTo Error_EH If Field2Decimal(txtLathYds) <> 0 Then txtPrSQYD = Format(Round((Field2Decimal(txtBidPrwCMU.Text) / Field2Decimal(txtLathYds.Text)), 2), "###.00") Else txtPrSQYD = "" End If txtInvType = moRSProj!inv_type If txtInvType = "0" Then lblInvType = "Original" ElseIf txtInvType = "1" Then lblInvType = "Tract Homes" ElseIf txtInvType = "2" Then lblInvType = "Custom Homes" ElseIf txtInvType = "3" Then lblInvType = "Multi Family" ElseIf txtInvType = "4" Then lblInvType = "Commercial" End If End With Call SecondLoad strSELECT = "texture = '" & mstrFINISH & "'" moRSLAB.Filter = strSELECT With moRSLAB txtSLRate = Format(Field2Str(!s_rate), "##.00") txtLLRate = Format(Field2Str(!l_rate), "##.00") txtMLRate = Format(Field2Str(!m_Rate), "##.00") txtMatMURate = Format(Field2Str(!matmu), "percent") txtSGRate = Format(Field2Str(!scr), "##.00") txtTPRate = Format(Field2Str(!tp), "##.00") txtMURate = Format(Field2Str(!mu), "percent") txtOHRate = Format(Field2Str(!ohp), "##.00") txtCMURate = Format(Field2Str(!CMU), "##.00") End With mboolSHOW = False Exit Sub Error_EH: gstrMODULE = "Form Take - Module FormShow" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub FormShowMeas() On Error GoTo Error_EH mboolSHOW = True With moRSMeas txtMeDesc = Field2Str(!Desc) txtMeSqFt = Field2Str(!sq_yds) txtMeType = Field2Str(!Type) If !Location = "FR" Then cboMeLocate.Text = "Front" ElseIf !Location = "BA" Then cboMeLocate.Text = "Back" ElseIf !Location = "LE" Then cboMeLocate.Text = "Left" ElseIf !Location = "RI" Then cboMeLocate.Text = "Right" ElseIf !Location = "GA" Then cboMeLocate.Text = "Gables" ' (4) 'cboMeLocate.List(4) ElseIf !Location = "FI" Then cboMeLocate.Text = "Fireplace" ElseIf !Location = "LI" Then cboMeLocate.Text = "Lid - Metal Lath" End If End With mboolSHOW = False Exit Sub Error_EH: gstrMODULE = "Form Take - Module FormShowMeas" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub FormShowMat() Dim strTYPE As String On Error GoTo Error_EH mboolSHOW = True With moRSMat txtMatInvNo = Field2Str(!inv_no) txtMatDesc = Field2Str(!Desc) txtMatQty = Field2Str(!qty) txtMatPrice = Format$(Field2Str(!price), "##,###.00") txtMetLength = Field2Integer(!calc_amt) chkTransfer = Field2CheckBox(!trnsflag) chkCalc = Field2CheckBox(!cflag) If !d_flag = "S" Then cboDFlag.Text = "Supplier" Else cboDFlag.Text = "Yard" End If strTYPE = Field2Str(!m_type) Call FindType(cboMType, strTYPE) If !calc_flag = "M" Then cboMetal.Text = "Metal" Else cboMetal.Text = "None" End If End With mboolSHOW = False Exit Sub Error_EH: gstrMODULE = "Form Take - Module FormShowMat" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub FormShowOpt() On Error GoTo Error_EH mboolSHOW = True gintOPTID = moRSOpt!OPTID With moRSOpt txtOYdge = Field2Integer(!yards) txtODesc = Field2Str(!Desc) txtOFin2 = Field2Integer(!fin2) txtOBAmt = Format$(Field2Str(!price), "##,###") txtOFAdj = Field2Integer(!f_adj) txtNote = Field2Str(!notes) chkOStone = Field2CheckBox(!ostone) txtOST_SqFt = Field2Str2(!OSt_SqFt) txtO68 = Field2Str2(!Scaf6) txtO108 = Field2Str2(!scaf10) chkST_Others = Field2CheckBox(!otstone) chkNoInvoice = Field2CheckBox(!invoice) lblOptNum = "Option Number " & Trim(Field2Str(!OPTID)) Call FindTexture2(Field2Str(!texture), strTYPE) If strTYPE = "" Then cboOFinish.ListIndex = -1 Else cboOFinish = strTYPE End If End With mboolSHOW = False Exit Sub Error_EH: gstrMODULE = "Form Take - Module FormShowOpt" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub FormShowOptMat() Dim strTYPE As String On Error GoTo Error_EH mboolSHOW = True With moRSOptMat txtOMInvNo = Field2Str(!inv_no) txtOMDesc = Field2Str(!Desc) txtOMQty = Field2Str(!qty) txtOMPrice = Format(Field2Str(!price), "##,###.00") txtOMMetL = Field2Integer(!calc_amt) If !d_flag = "S" Then cboOMDFlag.Text = "Supplier" Else cboOMDFlag.Text = "Yard" End If strTYPE = Field2Str(!m_type) Call FindType(cboOMType, strTYPE) If !calc_flag = "M" Then cboOMMetal.Text = "Metal" Else cboOMMetal.Text = "None" End If End With mboolSHOW = False Exit Sub Error_EH: gstrMODULE = "Form Take - Module FormSHowOptMat" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub FormSave() Dim strName As String, strMAX As String Dim oRSMAX As Recordset On Error GoTo Error_EH If mboolAdding Then moRS.AddNew moRS!pln_elv = Field2Str(txtNewElv) moRS!Proj_ID = gintPROJID moRS!stype = Field2Str(moRSProj!stype) ' moRS!origtoid = mintOLDTOID moRS!createuser = gstrLOGIN moRSLAB.AddNew moRSLAB!C_USER = gstrLOGIN End If If mboolCopy Then mintTOID = gintTOID moRS.AddNew moRS!pln_elv = Field2Str(txtNewElv) moRS!Proj_ID = gintPROJID moRS!stype = Field2Str(moRSProj!stype) moRS!origTOID = mintOLDTOID moRS!createuser = gstrLOGIN moRSLAB.AddNew moRSLAB!C_USER = gstrLOGIN End If If mboolMove Then mintTOID = gintTOID moRS.AddNew moRS!pln_elv = Field2Str(txtNewElv) moRS!Proj_ID = mintPROJID moRS!stype = Field2Str(moRSProj!stype) moRS!createuser = gstrLOGIN moRSLAB.AddNew moRSLAB!C_USER = gstrLOGIN mboolCopy = True 'is this causing problems when moving End If ' Store the controls to the recordset Call FieldsSave moRS.Update If mboolAdding Or mboolCopy Then strMAX = "SELECT Max(TOID) as MAXToid from tblTake" Set oRSMAX = New Recordset oRSMAX.Open strMAX, goConn, adOpenForwardOnly, adLockReadOnly moRSLAB!toid = oRSMAX!MAXToid oRSMAX.Close End If moRSLAB.Update moRS.Update If mboolAdding Then mboolAdding = False mboolMEAS = True Call CBFindString(lstMod_Elv, txtNewElv) End If If mboolCopy Then Call CopyTMat 'This will copy all of the old takeoff materials to the new takeoff Call CopyTMeas 'This will copy all of the old takeoff measurements to the new takeoff Call CopyTOpt 'This will copy all of the old takeoff options and option materials to the new takeoff Call CBFindString(lstMod_Elv, txtNewElv) 'This sets the bookmark in the Model/Elevation list to the new takeoff mintBOOKMARK = lstMod_Elv.ListIndex ' mboolCopy = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module FormSave" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub CopyTMat() Dim oRS As Recordset, oRSS As Recordset, oRSC As Recordset Dim strSQL As String, strSELECT As String, strCOPY As String On Error GoTo Error_EH strCOPY = "SELECT * FROM tblTOMatrl where toid = 1" Set oRSC = New Recordset oRSC.Open strCOPY, goConn, adOpenKeyset, adLockOptimistic strSQL = "SELECT toid FROM tblTake where not supersede and proj_id = " & mintPROJID & " and pln_elv = '" & Field2Str(txtNewElv) & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly gintTOID = Field2Long(oRS!toid) ' gintTOID = Field2Integer(oRS!toid) strSQL = "SELECT * FROM tblTOMatrl where toid = " & mintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic Do Until oRS.EOF With oRS oRSC.AddNew oRSC!toid = gintTOID oRSC!inv_no = Field2Str(oRS!inv_no) oRSC!Desc = Field2Str(oRS!Desc) oRSC!qty = Field2Str2(oRS!qty) oRSC!price = Field2Str2(oRS!price) oRSC!d_flag = Field2Str(oRS!d_flag) oRSC!m_type = Field2Str(oRS!m_type) oRSC!calc_flag = Field2Str(oRS!calc_flag) oRSC!calc_amt = Field2Integer(oRS!calc_amt) oRSC!trnsflag = Field2Str(oRS!trnsflag) oRSC!cflag = Field2Str(oRS!cflag) oRSC.Update End With oRS.MoveNext Loop Exit Sub Error_EH: gstrMODULE = "Form Take - Module CopyTMat" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub CopyTMeas() Dim oRS As Recordset, oRSS As Recordset, oRSC As Recordset Dim strSQL As String, strSELECT As String, strCOPY As String On Error GoTo Error_EH strCOPY = "SELECT * FROM tblMeasure where toid = 1" Set oRSC = New Recordset oRSC.Open strCOPY, goConn, adOpenKeyset, adLockOptimistic strSQL = "SELECT * FROM tblMeasure where toid = " & mintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly Do Until oRS.EOF With oRS oRSC.AddNew oRSC!toid = gintTOID oRSC!Desc = Field2Str(oRS!Desc) oRSC!sq_yds = Field2Str2(oRS!sq_yds) oRSC!Type = Field2Str(oRS!Type) oRSC!Location = Field2Str(oRS!Location) oRSC.Update End With oRS.MoveNext Loop Exit Sub Error_EH: gstrMODULE = "Form Take - Module CopyTMeas" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub CopyTOpt() Dim oRS As Recordset, oRSS As Recordset, oRSSS As Recordset, oRSC As Recordset Dim strSQL As String, strSELECT As String, strCOPY As String On Error GoTo Error_EH strCOPY = "SELECT * FROM tblOption" ' where toid = 7" Set oRSC = New Recordset oRSC.Open strCOPY, goConn, adOpenKeyset, adLockOptimistic strSQL = "SELECT * FROM tblOption where toid = " & mintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly Do Until oRS.EOF mintOPTID = oRS!OPTID With oRS oRSC.AddNew oRSC!toid = gintTOID oRSC!Desc = Field2Str(oRS!Desc) oRSC!yards = Field2Integer(oRS!yards) oRSC!price = Field2Str2(oRS!price) oRSC!texture = Field2Str(oRS!texture) oRSC!fin2 = Field2Integer(oRS!fin2) oRSC!f_adj = Field2Integer(oRS!f_adj) oRSC.Update End With strCOPY = "SELECT * FROM tblOptMatrl where toid = 1" Set oRSSS = New Recordset oRSSS.Open strCOPY, goConn, adOpenKeyset, adLockOptimistic strSELECT = "SELECT MAX(optid) as MAXoptid FROM tblOption" Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly gintOPTID = oRSS!maxoptid strSELECT = "SELECT * FROM tblOptMatrl where optid = " & mintOPTID Set oRSS = New Recordset oRSS.Open strSELECT, goConn, adOpenForwardOnly, adLockReadOnly Do Until oRSS.EOF With oRSS oRSSS.AddNew oRSSS!toid = gintTOID oRSSS!OPTID = gintOPTID oRSSS!inv_no = Field2Str(!inv_no) oRSSS!Desc = Field2Str(!Desc) oRSSS!qty = Field2Str2(!qty) oRSSS!price = Field2Str2(!price) oRSSS!d_flag = Field2Str(!d_flag) oRSSS!m_type = Field2Str(!m_type) oRSSS!calc_flag = Field2Str(!calc_flag) oRSSS!calc_amt = Field2Integer(!calc_amt) oRSSS.Update End With oRSS.MoveNext Loop oRS.MoveNext Loop Exit Sub Error_EH: gstrMODULE = "Form Take - Module CopyTOpt" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub ToggleButtons() End Sub Private Sub TextChanged() If Not mboolSHOW Then If Not cmdSave.Enabled Then Call ToggleButtons End If End If End Sub Private Function FormFind() As Boolean Dim strSQL As String, strSql2 As String, intTemp As Integer On Error GoTo Error_EH strSQL = "SELECT * " strSQL = strSQL & "FROM tblTake " strSQL = strSQL & "WHERE TOID = " & _ lstMod_Elv.ItemData(lstMod_Elv.ListIndex) Set moRS = New Recordset moRS.Open strSQL, goConn, _ adOpenKeyset, adLockPessimistic If moRS.EOF Then FormFind = False Else strSql2 = "SELECT * FROM tblTOLabor WHERE toid = " & lstMod_Elv.ItemData(lstMod_Elv.ListIndex) Set moRSLAB = New Recordset moRSLAB.Open strSql2, goConn, adOpenKeyset, adLockOptimistic If moRSLAB.EOF Then moRSLAB.AddNew moRSLAB!texture = Field2Str(mstrFINISH) moRSLAB!toid = gintTOID moRSLAB!C_USER = gstrLOGIN moRSLAB.Update Call GetLabor End If FormFind = True End If Exit Function Error_EH: moRS.Update Resume Next End Function Private Function FormFindMeas() As Boolean Dim strSQL As String On Error GoTo Error_EH strSQL = "SELECT * " strSQL = strSQL & "FROM tblMeasure " strSQL = strSQL & "WHERE ID = " & lstMeasure.ItemData(lstMeasure.ListIndex) If moRSMeas.State = adStateOpen Then moRSMeas.Close End If moRSMeas.Open strSQL, goConn, _ adOpenKeyset, adLockPessimistic If moRSMeas.EOF Then FormFindMeas = False Else FormFindMeas = True End If Exit Function Error_EH: gstrMODULE = "Form Take - Module FormFindMeas" Call ErrorHandler2 gstrMODULE = "" Exit Function End Function Private Function FormFindOpt() As Boolean Dim strSQL As String On Error GoTo Error_EH strSQL = "SELECT * " strSQL = strSQL & "FROM tblOption " strSQL = strSQL & "WHERE OPTID = " & lstOptions.ItemData(lstOptions.ListIndex) If moRSOpt.State = adStateOpen Then moRSOpt.Close End If moRSOpt.Open strSQL, goConn, _ adOpenKeyset, adLockPessimistic If moRSOpt.EOF Then FormFindOpt = False Else FormFindOpt = True End If Exit Function Error_EH: gstrMODULE = "Form Take - Module FormFindOpt" Call ErrorHandler2 gstrMODULE = "" Exit Function End Function Private Function FormFindOptMat() As Boolean Dim strSQL As String strSQL = "SELECT * " strSQL = strSQL & "FROM tblOptMatrl " strSQL = strSQL & "WHERE OPTID = " & gintOPTID & " and Inv_No = '" & lstOptMatrl.ItemData(lstOptMatrl.ListIndex) & "'" On Error GoTo Error_UP If moRSOptMat.State = adStateOpen Then moRSOptMat.Close End If On Error GoTo 0 moRSOptMat.Open strSQL, goConn, _ adOpenKeyset, adLockPessimistic If moRSOptMat.EOF Then FormFindOptMat = False Else FormFindOptMat = True End If Exit Function Error_UP: moRSOptMat.Update moRSOptMat.Close Resume Next End Function Private Function FormFindMat() As Boolean Dim strSQL As String On Error GoTo Error_EH strSQL = "SELECT * " strSQL = strSQL & "FROM tblTOMatrl " strSQL = strSQL & "WHERE TOID = " & gintTOID & " AND INV_NO = '" & lstTOMatrl.ItemData(lstTOMatrl.ListIndex) & "'" Set moRSMat = New Recordset ' If moRSMat.State = adStateOpen Then ' moRSMat.Close ' End If moRSMat.Open strSQL, goConn, _ adOpenKeyset, adLockOptimistic If moRSMat.EOF Then FormFindMat = False Else FormFindMat = True End If Exit Function Error_EH: gstrMODULE = "Form Take - Module FormFindMat" Call ErrorHandler2 gstrMODULE = "" Exit Function End Function Private Sub LoadCMat() Dim strSQL As String On Error GoTo Error_EH strSQL = "SELECT * " strSQL = strSQL & "FROM tblTOMatrl " strSQL = strSQL & "WHERE TOID = " & gintTOID Set moRSCMat = New Recordset moRSCMat.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not moRSCMat.EOF Then moRSCMat.MoveFirst mboolCALC = True Else mboolCALC = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module LoadCMat" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdChgLabRates_Click() frmLabor.Show 1 End Sub Private Sub cmdExit_Click() Unload Me End Sub Private Sub lstMeasure_Click() On Error GoTo Error_EH If lstMeasure.ListIndex <> -1 Then If FormFindMeas() Then Call FormShowMeas Else lstMeasure.Clear txtMeDesc = "" txtMeSqFt = "" txtMeType = "" cboMeLocate.Text = "" End If End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module lstMeasure_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub lstMod_Elv_Click() On Error GoTo Error_EH If lstMod_Elv.ListIndex <> -1 Then If FormFind() Then Call FormShow Call MeasLoad Call MatLoad Call OptLoad Call OptMatLoad cmdDeleteTakeoff.Enabled = False cmdNew.Enabled = True End If End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module lstMod_Elv_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub Measure_Setup() Dim strSQL As String Dim oRS As Recordset On Error GoTo Error_EH strSQL = "SELECT * FROM tblMeasure WHERE toid = 1" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic oRS.AddNew With oRS !toid = gintTOID !Desc = "BALANCE OF HOUSE" !sq_yds = 0 !Type = "" !Location = "FR" End With oRS.Update oRS.AddNew With oRS !toid = gintTOID !Desc = "BLACK BOARD" !sq_yds = 0 !Type = "B" !Location = "GA" End With oRS.Update oRS.Close Call MeasLoad Exit Sub Error_EH: gstrMODULE = "Form Take - Module Measure_Setup" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub FieldsSave() Dim oRSMAX As Recordset Dim strMAX As String On Error GoTo Error_EH With moRS If IsNull(!origTOID) Or !origTOID = 0 Then !origTOID = !toid ' !origtoid = !toid End If ' !origTOID = gintTOID !TTL_Yds = Single2Field(txtTTLYds) !lath_yds = Single2Field(txtLathYds) !opening = Single2Field(txtOpenings) !openpr = Single2Field(txtPrcntge) !CMUYDS = Single2Field(txtCMUYds) !notes = Str2Field(txtNotes) !f_adj = Integer2Field(txtFoamAdj) !l_adj = Integer2Field(txtLaborAdj) !st_adj = Integer2Field(txtStoneAdj) !w_adj = Integer2Field(txtWireAdj) !tex_lab = mdblTexLab !brn_lab = mdblBrnLab !fin2 = Integer2Field(txtFin2) !SAND_TONS = Integer2Field(txtSandTons) !sand = Str2Field(txtSandPrice) !METAL = Single2Field(txtMetalFt) !pl = Single2Field(txtStucLab) !ll = Single2Field(txtLathLab) !mlab = Single2Field(txtMetLab) !MISC = Single2Field(txtMisc) ' !mtmu = Str2Field(Format(txtMatMURate, "general number")) !MATMUPR = Str2Field(txtMatMU) !bidp = Single2Field(txtBidPrwCMU) !BIDC = Single2Field(txtTtlCost) !OH = Str2Field(txtTtlMU) !OHPR = Single2Field(txtOH) !SL_TG = Single2Field(txtScafGas) !tp = Str2Field(txtTape) !MATCOST = Single2Field(txtTtlMat) !BRDN = Single2Field(txtLabBur) !stone = chkStone !ST_SQFT = Single2Field(txtStone) !cmulab = Single2Field(txtCMUPrice) !TPE = Single2Field(txtTape) !openflg = chkOpen !twostory = chk2Story !Scaf6 = Integer2Field(txt68) !scaf10 = Integer2Field(txt108) !LSUser = gstrLOGIN !LSave = Date If chkUpdate Then !LUUser = gstrLOGIN !Update = Date End If If cboOneKote.Text = "Superwall" Then !stype = "S" ElseIf cboOneKote.Text = "Magna Wall" Then !stype = "M" ElseIf cboOneKote.Text = "Three Coat" Then !stype = "T" ElseIf cboOneKote.Text = "Synthetic" Then !stype = "C" ElseIf cboOneKote.Text = "Synthetic w/ 1 Kote" Then !stype = "B" ElseIf cboOneKote.Text = "San Man" Then !stype = "N" ElseIf cboOneKote.Text = "Western 1 Kote" Then !stype = "W" End If If optPTex(3) Then !finish = "SK" ElseIf optPTex(4) Then !finish = "DA" ElseIf optPTex(0) Then !finish = "SA" ElseIf optPTex(9) Then !finish = "SB" ElseIf optPTex(1) Then !finish = "S2" ElseIf optPTex(2) Then !finish = "S3" ElseIf optPTex(8) Then !finish = "DF" ElseIf optPTex(5) Then !finish = "SM" ElseIf optPTex(7) Then !finish = "QU" ElseIf optPTex(6) Then !finish = "MN" ElseIf optPTex(10) Then !finish = "MF" End If If mboolAdding Or mboolCopy Then moRSLAB!texture = !finish End If End With With moRSLAB !s_rate = Str2Field(txtSLRate) !l_rate = Str2Field(txtLLRate) !m_Rate = Str2Field(txtMLRate) !scr = Str2Field(txtSGRate) !tp = Str2Field(txtTPRate) !mu = Str2Field(Format(txtMURate, "general number")) !ohp = Str2Field(txtOHRate) !CMU = Str2Field(txtCMURate) !matmu = Str2Field(Format(txtMatMURate, "general number")) !bidprice = Field2Str2(txtBidPrwCMU) !U_USER = gstrLOGIN !U_date = Date End With Exit Sub Error_EH: gstrMODULE = "Form Take - Module FieldsSave" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdNew_Click() On Error GoTo Error_EH mboolAdding = True cboOneKote.Enabled = True cmdUPInvPrices.Enabled = False cmdExit.Caption = "&Cancel" cmdExit.Enabled = True cmdNew.Enabled = False cmdPrintTake.Enabled = False cmdPrintAllTake.Enabled = False cmdCopy.Enabled = False cmdDeleteTakeoff.Enabled = False cmdSave.Enabled = True lstMod_Elv.Enabled = False Call FormClear Call MatClear Call MeasClear Call OptClear gintOPTID = 0 gintTOID = 0 lstOptions.Clear lstMeasure.Clear lstTOMatrl.Clear lstOptMatrl.Clear lblNewElv.Visible = True txtNewElv.Visible = True lstMod_Elv.Enabled = False txtNewElv = "" txtNewElv.SetFocus Exit Sub Error_EH: gstrMODULE = "Form Take - Module cmdNew_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub cmdSave_Click() Dim intSAVE If Not mboolAdding And Not mboolCopy Then intSAVE = lstMod_Elv.ListIndex End If cboOneKote.TabStop = False Call cmdUpMeasCalc_Click Call FormSave Call ListLoad If mboolCopy Then Call CBFindString(lstMod_Elv, txtNewElv) intSAVE = lstMod_Elv.ListIndex mboolCopy = False End If cmdUPInvPrices.Enabled = True cmdExit.Caption = "&Exit" cmdExit.Enabled = True cmdNew.Enabled = True cmdCopy.Enabled = True cmdPrintTake.Enabled = True cmdPrintAllTake.Enabled = True cmdDeleteTakeoff.Enabled = True cmdSave.Enabled = False chkUpdate = vbUnchecked lstMod_Elv.Enabled = True If mboolMEAS Then tabTake.Tab = 0 Call CBFindString(lstMod_Elv, txtNewElv) Call Measure_Setup Call lstMeasure_DblClick mboolMEAS = False Else lstMod_Elv.ListIndex = intSAVE End If lblNewElv.Visible = False txtNewElv.Visible = False lstMod_Elv.Enabled = True End Sub Private Sub Form_Activate() Dim intResponse As Integer Dim strSQL As String, strSql2 As String On Error GoTo Error_EH mboolMove = False mboolSETUP = False mboolENTER = False chkUpdate = vbUnchecked ' mstrFILE = "tblInvTake" If lstMod_Elv.ListCount = 0 Then intResponse = MsgBox("No Plan/Elevation, do you wish to add one?", vbYesNo + vbQuestion, "Add Records") If intResponse = vbYes Then strSQL = "SELECT * FROM tbltake WHERE toid = 1" Set moRS = New Recordset moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic strSql2 = "SELECT * FROM tblTOLabor where toid = 1" Set moRSLAB = New Recordset moRSLAB.Open strSql2, goConn, adOpenKeyset, adLockOptimistic Call cmdNew_Click Else Unload Me End If End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module Form_Activate" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Dim intResponse As Integer, strMSG As String On Error GoTo Error_EH If cmdSave.Enabled Then strMSG = "Data Has Been Changed" strMSG = strMSG & Chr(13) & Chr(10) strMSG = strMSG & "Save Changes ?" intResponse = MsgBox(strMSG, vbQuestion + vbYesNoCancel, Me.Caption) Select Case intResponse Case vbYes Call FormSave Case vbNo Case vbCancel Cancel = True Exit Sub End Select End If If moRS.State = adStateOpen Then moRS.Close End If If moRSMat.State = adStateOpen Then moRSMat.Close End If If moRSOptMat.State = adStateOpen Then moRSOptMat.Close End If If moRSOpt.State = adStateOpen Then moRSOpt.Close End If If moRSOptMat.State = adStateOpen Then moRSOptMat.Close End If If moRSProj.State = adStateOpen Then moRSProj.Close End If gintTOID = 0 gintPROJID = 0 Exit Sub Error_EH: If Err = 3219 Then Resume Next Else End If End Sub Private Sub FormClear() chkCalc = vbUnchecked chkTransfer = vbUnchecked txtTTLYds = "0" txtLathYds = "0" txtStuccoYds = "0" txtOpenings = "0" txtPrcntge = "0" txtCMUYds = "0" txtCreated = "" ' txtUpdate = "" txtStone = 0 chkStone = vbUnchecked txtNotes = "" txtFoamAdj = 0 txtLaborAdj = 0 txtStoneAdj = 0 txtWireAdj = 0 txtFin2 = "0" txtSandTons = "0" txtSandPrice = "0" txtMetalFt = "0" txtStucLab = "0" txtLathLab = "0" txtMetLab = "0" txtMisc = "0" txtMatMU = "0" txtBidPrwCMU = "0" txtBidPrice = "0" txtTtlCost = "0" txtTtlMU = "0" txtOH = "0" txtPrSQYD = "0" txtSandAmt = "0" txtScafGas = "0" txtTape = "0" txtTtlMat = "0" txtLabBur = "0" txtSLRate = "0" txtLLRate = "0" txtMLRate = "0" txtSGRate = "0" txtTPRate = "0" txtMURate = "0" txtMatMURate = "0" txtOHRate = "0" txtCMURate = "0" txtSandPr = "0" txtSkipPr = "0" txtDashPr = "0" txtSmoothPr = "0" txtMonterreyPr = "0" txtQUPr = "0" txtDFPr = "0" txtSBPr = "0" txtNote = "" cboOneKote.ListIndex = -1 txt68 = "" txt108 = "" txtO68 = "" txtO108 = "" chk2Story = vbUnchecked chkSand.Value = vbUnchecked chkSkip.Value = vbUnchecked chkDash.Value = vbUnchecked chkSmooth.Value = vbUnchecked chkMonterrey.Value = vbUnchecked chkQU.Value = vbUnchecked chkDF.Value = vbUnchecked chkSB.Value = vbUnchecked chkMF.Value = vbUnchecked End Sub Private Sub MeasLoad() Dim oRS As Recordset Dim strSQL As String, strTYPE As String Dim strLine As String On Error GoTo Error_EH strSQL = "SELECT ID, TOID, Desc, Sq_yds from tblmeasure WHERE toid = " & gintTOID 'cboProject.ListIndex" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstMeasure.Clear Do Until oRS.EOF With lstMeasure strLine = oRS("sq_yds") & vbTab & oRS("desc") .AddItem strLine .ItemData(.NewIndex) = oRS("ID") End With oRS.MoveNext Loop oRS.Close If lstMeasure.ListCount Then lstMeasure.ListIndex = 0 Else txtMeDesc = "" txtMeSqFt = "0" txtMeType = "" cboMeLocate.ListIndex = -1 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module MeasLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub MeasClear() txtMeDesc = "" txtMeSqFt = "0" txtMeType = "" cboMeLocate.ListIndex = -1 End Sub Private Sub MeLocateLoad() cboMeLocate.AddItem ("Front") cboMeLocate.AddItem ("Back") cboMeLocate.AddItem ("Left Side") cboMeLocate.AddItem ("Right Side") cboMeLocate.AddItem ("Gables") cboMeLocate.AddItem ("Fireplace") cboMeLocate.AddItem ("Lid - Rib Lath") cboMeLocate.AddItem ("Stone - Metal Lath") cboMeLocate.AddItem ("Stone - 17 Gauge") End Sub Private Sub StuccoLoad() cboOneKote.AddItem ("Superwall") cboOneKote.ItemData(cboOneKote.NewIndex) = 1 cboOneKote.AddItem ("Magna Wall") cboOneKote.ItemData(cboOneKote.NewIndex) = 2 cboOneKote.AddItem ("Three Coat") cboOneKote.ItemData(cboOneKote.NewIndex) = 3 cboOneKote.AddItem ("Western 1 Kote") cboOneKote.ItemData(cboOneKote.NewIndex) = 4 cboOneKote.AddItem ("Synthetic") cboOneKote.ItemData(cboOneKote.NewIndex) = 5 cboOneKote.AddItem ("Synthetic Over 1 Kote") cboOneKote.ItemData(cboOneKote.NewIndex) = 6 End Sub Private Sub MatLoad() Dim oRS As Recordset Dim strSQL As String Dim strLine As String On Error GoTo Error_EH strSQL = "SELECT TOID, Inv_no, Desc, Qty, D_Flag, M_Type, Calc_Flag from tblTOMatrl WHERE toid = " & gintTOID & " ORDER BY Inv_no" 'cboProject.ListIndex" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstTOMatrl.Clear Do Until oRS.EOF With lstTOMatrl strLine = oRS("D_Flag") & " " & oRS("M_Type") & " " & oRS("Calc_Flag") & vbTab & oRS("Qty") & vbTab & Format(oRS("Inv_No"), "####") & vbTab & oRS("desc") .AddItem strLine .ItemData(.NewIndex) = oRS("inv_no") End With oRS.MoveNext Loop oRS.Close If lstTOMatrl.ListCount Then lstTOMatrl.ListIndex = 0 Else txtMatInvNo = "0" txtMatDesc = "" txtMatQty = "0" txtMatPrice = "0" txtMetLength = "0" cboDFlag.ListIndex = -1 cboMType.ListIndex = -1 cboMetal.ListIndex = -1 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module MatLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub MeasSave() Dim strSQL As String Dim oRS As Recordset On Error GoTo Error_EH If moRSMeas.State = adStateClosed Then strSQL = "SELECT * FROM tblMeasure WHERE toid = 1" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic oRS.AddNew With oRS !toid = gintTOID !Desc = Str2Field(txtMeDesc) !sq_yds = Str2Field(txtMeSqFt) !Type = Str2Field(txtMeType) If cboMeLocate.Text = "Front" Then !Location = "FR" ElseIf cboMeLocate.Text = "Back" Then !Location = "BA" ElseIf cboMeLocate.Text = "Left" Then !Location = "LE" ElseIf cboMeLocate.Text = "Right" Then !Location = "RI" ElseIf cboMeLocate.Text = "Gables" Then ' (4) 'cboMeLocate.List(4) !Location = "GA" ElseIf cboMeLocate.Text = "Fireplace" Then !Location = "FI" ElseIf cboMeLocate.Text = "Lid - Rib Lath" Then !Location = "LI" ElseIf cboMeLocate.Text = "Stone - Metal Lath" Then !Location = "ST" ElseIf cboMeLocate.Text = "Stone - 17 Gauge" Then !Location = "SG" End If End With oRS.Update oRS.Close Call MeasLoad If mboolAdding Then mboolAdding = False End If Exit Sub End If If mboolAdding Then moRSMeas.AddNew End If With moRSMeas !toid = gintTOID !Desc = Str2Field(txtMeDesc) !sq_yds = Str2Field(txtMeSqFt) !Type = Str2Field(txtMeType) If cboMeLocate.Text = "Front" Then !Location = "FR" ElseIf cboMeLocate.Text = "Back" Then !Location = "BA" ElseIf cboMeLocate.Text = "Left" Then !Location = "LE" ElseIf cboMeLocate.Text = "Right" Then !Location = "RI" ElseIf cboMeLocate.Text = "Gables" Then ' (4) 'cboMeLocate.List(4) !Location = "GA" ElseIf cboMeLocate.Text = "Fireplace" Then !Location = "FI" ElseIf cboMeLocate.Text = "Lid - Metal Lath" Then !Location = "LI" End If End With moRSMeas.Update If mboolAdding Then mboolAdding = False End If Exit Sub Error_EH: Call ErrorHandler(moRSMeas.ActiveConnection) Exit Sub End Sub Private Sub MatSave() Dim strSQL As String Dim oRS As Recordset On Error GoTo Error_EH If moRSMat.State = adStateClosed Then strSQL = "SELECT * FROM tblTOMatrl WHERE toid = 1" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic oRS.AddNew With oRS !toid = gintTOID !inv_no = Str2Field(txtMatInvNo) !Desc = Str2Field(txtMatDesc) !qty = Str2Field(txtMatQty) !price = Str2Field(txtMatPrice) !calc_amt = Integer2Field(txtMetLength) !trnsflag = chkTransfer !cflag = chkCalc If cboDFlag.Text = "Supplier" Then !d_flag = "S" ElseIf cboDFlag.Text = "Yard" Then !d_flag = "Y" End If !m_type = Left$(cboMType.Text, 1) If cboMetal.Text = "Metal" Then !calc_flag = "M" ElseIf cboMetal.Text = "None" Then !calc_flag = "" End If End With oRS.Update oRS.Close ' Call MatLoad If Not mboolSETUP Then If mboolAdding Then mboolAdding = False End If End If Exit Sub End If If mboolAdding Then moRSMat.AddNew End If With moRSMat !toid = gintTOID !inv_no = Str2Field(txtMatInvNo) !Desc = Str2Field(txtMatDesc) !qty = Str2Field(txtMatQty) !price = Str2Field(txtMatPrice) !calc_amt = Integer2Field(txtMetLength) !trnsflag = chkTransfer !cflag = chkCalc If cboDFlag.Text = "Supplier" Then !d_flag = "S" ElseIf cboDFlag.Text = "Yard" Then !d_flag = "Y" End If !m_type = Left$(cboMType.Text, 1) If cboMetal.Text = "Metal" Then !calc_flag = "M" ElseIf cboMetal.Text = "None" Then !calc_flag = "" End If End With moRSMat.Update If Not mboolSETUP Then If mboolAdding Then mboolAdding = False End If End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module MatSave" Call ErrorHandler2 gstrMODULE = "" cmdExit.Enabled = True Exit Sub ' If Err = "-2147467259" Then ' Resume Next ' ' Else ' Call ErrorHandler(moRSMat.ActiveConnection) ' Exit Sub ' End If End Sub Private Sub MatClear() txtMatInvNo = "0" txtMatDesc = "" txtMatQty = "0" txtMatPrice = "0" txtMetLength = "0" cboDFlag.ListIndex = -1 cboMType.ListIndex = -1 cboMetal.ListIndex = -1 chkTransfer = vbUnchecked chkCalc = vbUnchecked End Sub Private Sub OptMatLoad() Dim oRS As Recordset Dim strSQL As String Dim strLine As String On Error GoTo Error_EH strSQL = "SELECT TOID, OPTID, Inv_no, Desc, Qty, D_Flag, M_Type, Calc_Flag from tblOPTMatrl WHERE optid = " & gintOPTID 'cboProject.ListIndex" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstOptMatrl.Clear Do Until oRS.EOF With lstOptMatrl strLine = oRS("D_Flag") & " " & oRS("M_Type") & " " & oRS("Calc_Flag") & vbTab & oRS("Qty") & vbTab & oRS("Inv_No") & vbTab & oRS("desc") .AddItem strLine .ItemData(.NewIndex) = oRS("inv_no") End With oRS.MoveNext Loop oRS.Close If lstOptMatrl.ListCount Then lstOptMatrl.ListIndex = 0 Else txtOMInvNo = "0" txtOMDesc = "" txtOMQty = "0" txtOMPrice = "0" txtOMMetL = "0" cboOMDFlag.ListIndex = -1 cboOMType.ListIndex = -1 cboOMMetal.ListIndex = -1 End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module OptMatLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub OptMatClear() txtOMInvNo = "0" txtOMDesc = "" txtOMQty = "0" txtOMPrice = "0" txtOMMetL = "0" cboOMDFlag.ListIndex = -1 cboOMType.ListIndex = -1 cboOMMetal.ListIndex = -1 End Sub Private Sub OptClear() txtOYdge = "0" txtODesc = "" txtOFin2 = "0" txtOBAmt = "0" txtOFAdj = "0" txtNote = "" txtOST_SqFt = "" chkOStone = vbUnchecked chkST_Others = vbUnchecked chkNoInvoice = vbUnchecked cboOFinish.ListIndex = -1 lstOptMatrl.Clear txtOMInvNo = "0" txtOMDesc = "" txtOMQty = "0" txtOMPrice = "0" txtOMMetL = "0" txtO68 = "" txtO108 = "" cboOMDFlag.ListIndex = -1 cboOMType.ListIndex = -1 cboOMMetal.ListIndex = -1 cmdAddOpt.Enabled = True cmdSaveOpt.Enabled = False cmdAddOptMat.Enabled = True cmdSaveOptMat.Enabled = False gintOPTID = 0 End Sub Private Sub OptLoad() Dim oRS As Recordset Dim strSQL As String Dim strLine As String On Error GoTo Error_EH strSQL = "SELECT TOID, OPTID, Desc, Yards from tblOption WHERE toid = " & gintTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly lstOptions.Clear Do Until oRS.EOF With lstOptions strLine = oRS("Yards") & vbTab & oRS("desc") .AddItem strLine .ItemData(.NewIndex) = oRS("OPTID") End With oRS.MoveNext Loop oRS.Close If lstOptions.ListCount Then lstOptions.ListIndex = 0 Else txtOYdge = "0" txtODesc = "" txtOFin2 = "0" txtOBAmt = "0" txtOFAdj = "0" txtOST_SqFt = "" chkOStone = vbUnchecked chkST_Others = vbUnchecked chkNoInvoice = vbUnchecked txtNote = "" cboOFinish.ListIndex = -1 lstOptMatrl.Clear txtOMInvNo = "0" txtOMDesc = "" txtOMQty = "0" txtOMPrice = "0" txtOMMetL = "0" cboOMDFlag.ListIndex = -1 cboOMType.ListIndex = -1 cboOMMetal.ListIndex = -1 gintOPTID = 0 cmdAddOptMat.Enabled = False End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module OptLoad" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub lstMod_Elv_DblClick() cmdNew.Enabled = False cmdCopy.Enabled = False cmdDeleteTakeoff.Enabled = True cmdSave.Enabled = True End Sub Private Sub lstOptions_Click() If lstOptions.ListIndex <> -1 Then If FormFindOpt() Then Call FormShowOpt Call OptMatLoad If lstOptMatrl.ListIndex <> -1 Then If FormFindOptMat() Then Call FormShowOptMat Else lstOptMatrl.Clear txtOMInvNo = "0" txtOMDesc = "" txtOMQty = "0" txtOMPrice = "0" txtOMMetL = "0" cboOMDFlag.Text = "" cboOMType.Text = "" cboOMMetal.Text = "" End If End If Else lstOptions.Clear txtOYdge = "0" txtODesc = "" txtOFin2 = "0" txtOBAmt = "0" txtOFAdj = "0" cboOFinish.ListIndex = -1 End If End If End Sub Private Sub lstOptions_DblClick() cmdSaveOpt.Enabled = True cmdDelOpt.Enabled = True cmdAddOpt.Enabled = False cmdCopyOpt.Enabled = True End Sub Private Sub lstOptMatrl_Click() If lstOptMatrl.ListIndex <> -1 Then If FormFindOptMat() Then Call FormShowOptMat Else lstOptMatrl.Clear txtOMInvNo = "0" txtOMDesc = "" txtOMQty = "0" txtOMPrice = "0" txtOMMetL = "0" cboOMDFlag.Text = "" cboOMType.Text = "" cboOMMetal.Text = "" End If End If End Sub Private Sub lstOptMatrl_DblClick() lstOptions.Enabled = False cmdAddOptMat.Enabled = False cmdSaveOptMat.Enabled = True cmdDelOptMat.Enabled = True End Sub Private Sub lstTOMatrl_Click() If lstTOMatrl.ListIndex <> -1 Then If FormFindMat() Then Call FormShowMat Else lstTOMatrl.Clear txtMatInvNo = "0" txtMatDesc = "" txtMatQty = "0" txtMatPrice = "0" txtMetLength = "0" cboDFlag.ListIndex = -1 cboMType.ListIndex = -1 cboMetal.ListIndex = -1 End If End If End Sub Private Sub lstTOMatrl_DblClick() mintBOOKMARK = lstTOMatrl.ListIndex cmdSaveMat.Enabled = True cmdAddMat.Enabled = False cmdDelMat.Enabled = True cmdDel1900.Enabled = True If lstTOMatrl.ListCount > 0 Then lstTOMatrl.ListIndex = mintBOOKMARK End If End Sub Private Sub optInv_Click(Index As Integer) If optInv(0) Then mstrFILE = "tblInvtry" End If If optInv(1) Then mstrFILE = "tblInvTake" End If End Sub Private Sub GetLabor() Dim oRS As Recordset Dim strSQL As String, strLABOR As String On Error GoTo Error_EH strLABOR = "SELECT * FROM tblTOLabor WHERE toid = " & gintTOID Set moRSLAB = New Recordset moRSLAB.Open strLABOR, goConn, adOpenKeyset, adLockOptimistic strLABOR = "texture = '" & mstrFINISH & "'" moRSLAB.Filter = strLABOR strSQL = "SELECT * from tblPrgInfo WHERE Texture = '" & mstrFINISH & "'" Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly txtSLRate = Format(Field2Str(oRS!s_rate), "##.00") moRSLAB!s_rate = Field2Str(oRS!s_rate) txtLLRate = Format(Field2Str(oRS!l_rate), "##.00") moRSLAB!l_rate = Field2Str(oRS!l_rate) txtMLRate = Format(Field2Str(oRS!m_Rate), "##.00") moRSLAB!m_Rate = Field2Str(oRS!m_Rate) txtTPRate = Field2Str(oRS!tp) moRSLAB!tp = Field2Str(oRS!tp) txtMURate = Format(Field2Str(oRS!mu), "percent") moRSLAB!mu = Field2Str(oRS!mu) txtOHRate = Format(Field2Str(oRS!ohp), "##.00") moRSLAB!ohp = Field2Str(oRS!ohp) txtMatMURate = Format(Field2Str(oRS!matmu), "percent") moRSLAB!matmu = Field2Str(oRS!matmu) txtCMURate = Format(Field2Str(oRS!CMU), "##.00") moRSLAB!CMU = Field2Str(oRS!CMU) ' If chk2Story Then ' txtSGRate = Format((Field2Str(oRS!scr) * 1.5), "##.00") ' moRSLAB!scr = Field2Str((oRS!scr) * 1.5) ' Else txtSGRate = Format(Field2Str(oRS!scr), "##.00") moRSLAB!scr = Field2Str(oRS!scr) ' End If moRS!cladj = Format(Field2Str(oRS!cladj), "##.00") Call FormSave ' moRSLAB.Update oRS.Close Exit Sub Error_EH: gstrMODULE = "Form Take - Module GetLabor" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub optPTex_Click(Index As Integer) Dim strLABOR As String, strSQL As String On Error GoTo Error_EH strSQL = "SELECT * FROM tblTOLabor WHERE toid = " & gintTOID Set moRSLAB = New Recordset moRSLAB.Open strSQL, goConn, adOpenKeyset, adLockOptimistic Select Case Index Case 0 mstrFINISH = "SA" txtFinish.Text = "SAND - 16" moRS!finish = mstrFINISH Case 1 mstrFINISH = "S2" txtFinish.Text = "SAND - 20" moRS!finish = mstrFINISH Case 2 mstrFINISH = "S3" txtFinish.Text = "SAND - 30" moRS!finish = mstrFINISH Case 3 mstrFINISH = "SK" txtFinish.Text = "SKIP TROWEL" moRS!finish = mstrFINISH Case 4 mstrFINISH = "DA" txtFinish.Text = "DASH" moRS!finish = mstrFINISH Case 5 mstrFINISH = "SM" txtFinish.Text = "SMOOTH" moRS!finish = mstrFINISH Case 6 mstrFINISH = "MN" txtFinish.Text = "MONTERREY" moRS!finish = mstrFINISH Case 7 mstrFINISH = "QU" txtFinish.Text = "QUERNAVACA" moRS!finish = mstrFINISH Case 8 mstrFINISH = "DF" txtFinish.Text = "SKIP AND SAND FINISH" moRS!finish = mstrFINISH Case 9 mstrFINISH = "SB" txtFinish.Text = "EIFS - SANDBLAST" moRS!finish = mstrFINISH Case 10 mstrFINISH = "MF" txtFinish.Text = "MONTERREY & SAND" moRS!finish = mstrFINISH Case 11 mstrFINISH = "SS" txtFinish.Text = "SKIP AND RSAND FINISH" moRS!finish = mstrFINISH End Select strLABOR = "SELECT * FROM tblTOLabor WHERE toid = " & gintTOID Set moRSLAB = New Recordset moRSLAB.Open strLABOR, goConn, adOpenKeyset, adLockOptimistic strLABOR = "texture = '" & mstrFINISH & "'" moRSLAB.Filter = strLABOR If moRSLAB.EOF Then moRSLAB.AddNew moRSLAB!texture = Field2Str(mstrFINISH) moRSLAB!toid = gintTOID moRSLAB!C_USER = gstrLOGIN moRSLAB.Update Call GetLabor End If Call FormShow Exit Sub Error_EH: gstrMODULE = "Form Take - Module optPTex_Click" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub tabTake_Click(PreviousTab As Integer) Dim intResponse As Integer, strMSG As String If PreviousTab = 0 Then If cmdSaveMeas.Enabled = True Then strMSG = "Measure Data Has Been Changed" strMSG = strMSG & Chr(13) & Chr(10) strMSG = strMSG & "Save Changes ?" intResponse = MsgBox(strMSG, vbQuestion + vbYesNoCancel, Me.Caption) Select Case intResponse Case vbYes Call MeasSave Case vbNo Case vbCancel tabTake.Tab = 0 Exit Sub End Select End If End If If PreviousTab = 1 Then If cmdSetup.Caption = "Setup Materials &Off" Then Call cmdSetup_Click End If If cmdUpdate.Caption = "Update &Materials Off" Then Call cmdUpdate_Click End If If cmdSaveMat.Enabled = True Then strMSG = "Material Data Has Been Changed" strMSG = strMSG & Chr(13) & Chr(10) strMSG = strMSG & "Save Changes ?" intResponse = MsgBox(strMSG, vbQuestion + vbYesNoCancel, Me.Caption) Select Case intResponse Case vbYes Call MatSave Case vbNo Case vbCancel tabTake.Tab = 1 Exit Sub End Select End If ' Exit Sub End If If PreviousTab = 2 Then If cmdSaveOpt.Enabled = True Then strMSG = "Option Data Has Been Changed" strMSG = strMSG & Chr(13) & Chr(10) strMSG = strMSG & "Save Changes ?" intResponse = MsgBox(strMSG, vbQuestion + vbYesNoCancel, Me.Caption) Select Case intResponse Case vbYes Call OptSave Case vbNo Case vbCancel tabTake.Tab = 2 Exit Sub End Select End If If cmdSaveOptMat.Enabled = True Then strMSG = "Option Material Data Has Been Changed" strMSG = strMSG & Chr(13) & Chr(10) strMSG = strMSG & "Save Changes ?" intResponse = MsgBox(strMSG, vbQuestion + vbYesNoCancel, Me.Caption) Select Case intResponse Case vbYes Call OptMatSave Case vbNo Case vbCancel tabTake.Tab = 2 Exit Sub End Select End If ' Exit Sub End If If tabTake.Tab = 3 Then txtNotes.SetFocus End If End Sub Private Sub txt108_GotFocus() Call FieldSelect(txt108) End Sub Private Sub txt68_GotFocus() Call FieldSelect(txt68) End Sub Private Sub txtBidPrwCMU_GotFocus() Call FieldSelect(txtBidPrwCMU) End Sub Private Sub txtCMUPrice_GotFocus() Call FieldSelect(txtCMUPrice) End Sub Private Sub txtCMUYds_GotFocus() Call FieldSelect(txtCMUYds) End Sub Private Sub txtCMUYds_LostFocus() If Field2Str2(txtCMUYds) > 32300 Then Beep MsgBox "CMU Yardage cannot be over 32,300 -- ReEnter", vbOKOnly, "Re-Enter" txtCMUYds.SetFocus End If End Sub Private Sub txtFin2_GotFocus() Call FieldSelect(txtFin2) End Sub Private Sub txtFoamAdj_GotFocus() Call FieldSelect(txtFoamAdj) End Sub Private Sub txtLaborAdj_GotFocus() Call FieldSelect(txtLaborAdj) End Sub Private Sub txtMatInvNo_LostFocus() txtMatInvNo = UCase(txtMatInvNo) End Sub Private Sub txtStoneAdj_GotFocus() Call FieldSelect(txtStoneAdj) End Sub Private Sub txtMatDesc_GotFocus() Call FieldSelect(txtMatDesc) End Sub Private Sub txtMatDesc_LostFocus() txtMatDesc = UCase(txtMatDesc) End Sub Private Sub txtMatInvNo_GotFocus() Call FieldSelect(txtMatInvNo) End Sub Private Sub txtMatPrice_GotFocus() Call FieldSelect(txtMatPrice) End Sub Private Sub txtMatQty_GotFocus() Call FieldSelect(txtMatQty) End Sub Private Sub txtMatQty_LostFocus() Dim lngFind As String Dim strSQL As String 'dim If mboolSETUP Then Call MatSave lngFind = Field2Str(txtMatInvNo) If lstMInventory.ListCount > lstMInventory.ListIndex Then Call ListFindItem2(lstMInventory, lngFind) '*** FIX change to string lstMInventory.ListIndex = lstMInventory.ListIndex + 1 Else Call ListFindItem2(lstMInventory, lngFind) End If lstMInventory.SetFocus Call MatClear mboolENTER = True End If If mboolUPDATE Then Call MatSave lngFind = Field2Long(txtMatInvNo) Call MatLoad If lstTOMatrl.ListCount > lstTOMatrl.ListIndex Then Call ListFindItem2(lstTOMatrl, lngFind) lstTOMatrl.ListIndex = lstTOMatrl.ListIndex + 1 Else Call ListFindItem2(lstTOMatrl, lngFind) End If lstTOMatrl.SetFocus ' Call MatClear mboolENTER = True End If End Sub Private Sub txtMeDesc_GotFocus() Call FieldSelect(txtMeDesc) End Sub Private Sub txtMeDesc_LostFocus() txtMeDesc = UCase(txtMeDesc) End Sub Private Sub txtMeSqFt_GotFocus() Call FieldSelect(txtMeSqFt) End Sub Private Sub txtMetLength_GotFocus() Call FieldSelect(txtMetLength) End Sub Private Sub txtMeType_GotFocus() Call FieldSelect(txtMeType) End Sub Private Sub txtMisc_GotFocus() Call FieldSelect(txtMisc) End Sub Private Sub txtNewElv_LostFocus() txtNewElv = UCase(txtNewElv) Call cmdSave_Click ' cmdSave.SetFocus End Sub Private Sub txtNote_LostFocus() txtNote.Text = UCase(txtNote.Text) End Sub Private Sub txtNotes_LostFocus() txtNotes = UCase(txtNotes) If tabTake.Tab = 3 Then txtSandPrice.SetFocus End If End Sub Private Sub txtO108_GotFocus() Call FieldSelect(txtO108) End Sub Private Sub txtO68_GotFocus() Call FieldSelect(txtO68) End Sub Private Sub txtOBAmt_GotFocus() Call FieldSelect(txtOBAmt) End Sub Private Sub txtODesc_GotFocus() Call FieldSelect(txtODesc) End Sub Private Sub txtODesc_LostFocus() txtODesc = UCase(txtODesc) End Sub Private Sub txtOFAdj_GotFocus() Call FieldSelect(txtOFAdj) End Sub Private Sub txtOFin2_GotFocus() Call FieldSelect(txtOFin2) End Sub Private Sub txtOMDesc_GotFocus() Call FieldSelect(txtOMDesc) End Sub Private Sub txtOMDesc_LostFocus() txtOMDesc = UCase(txtOMDesc) End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Dim ShiftDown, AltDown, CtrlDown On Error GoTo Error_EH If Shift = 4 Then Exit Sub End If ShiftDown = (Shift And vbShiftMask) > 0 AltDown = (Shift And vbAltMask) > 0 CtrlDown = (Shift And vbCtrlMask) > 0 If KeyCode = vbKeyD Then ' Display key combinations. If CtrlDown And tabTake.Tab = 1 Then Call cmdDelMat_Click cmdDel1900.Enabled = True cmdAddMat.Enabled = False End If If CtrlDown And tabTake.Tab = 0 Then Call cmdDelMeas_Click cmdAddMeas.Enabled = False End If If CtrlDown And tabTake.Tab = 2 Then cmdDelOptMat.Enabled = True cmdDelOpt.Enabled = True cmdAddOpt.Enabled = False cmdAddOptMat.Enabled = False End If Exit Sub ElseIf KeyCode = vbKeyT Then If CtrlDown Then txtNotes.SetFocus End If ElseIf KeyCode = vbKeyR Then If CtrlDown Then ' gintNTOID = moRS!toid gintNTOID = moRS!origTOID frmViewTake.Show 1 End If ElseIf KeyCode = vbKeyS Then If CtrlDown Then moRS!Supersede = vbChecked moRS!superdate = Date moRS.Update mintOLDTOID = Field2Str2(moRS!origTOID) Call Supersede Call UpTOID ' txtNotes.SetFocus End If ElseIf KeyCode = vbKeyF12 Then If tabTake.Tab = 0 Then Call cmdDelMeas_Click End If If tabTake.Tab = 1 And Not mboolSETUP Then Call cmdDelMat_Click KeyCode = 0 End If If tabTake.Tab = 2 Then Call cmdDelOpt_Click End If ElseIf KeyCode = vbKeyF11 Then If tabTake.Tab = 1 And Not (mboolSETUP Or mboolUPDATE) Then Call cmdAddMat_Click KeyCode = 0 End If If tabTake.Tab = 2 And cmdAddOpt.Enabled Then Call cmdAddOpt_Click End If ElseIf KeyCode = vbKeyF10 Then If tabTake.Tab = 2 And cmdAddOptMat.Enabled Then Call cmdDelOptMat_Click End If ElseIf KeyCode = vbKeyF9 Then If tabTake.Tab = 2 And cmdAddOptMat.Enabled Then Call cmdAddOptMat_Click End If ElseIf KeyCode = vbKeyO Then If CtrlDown And tabTake.Tab = 0 Then txtOpenings.SetFocus End If Else If Shift = 2 Then Exit Sub End If If mboolSETUP Or mboolUPDATE Then Exit Sub ElseIf KeyCode < 48 Then Exit Sub ' ElseIf KeyCode > 13 And KeyCode < 48 Then ' Exit Sub Else If Not cmdSave.Enabled Then cmdSave.Enabled = True cmdNew.Enabled = False cmdCopy.Enabled = False cmdPrintTake.Enabled = False cmdPrintAllTake.Enabled = False End If If tabTake.Tab = 0 And Not cmdSaveMeas.Enabled Then cmdSaveMeas.Enabled = True cmdAddMeas.Enabled = False cmdUpMeasCalc.Enabled = False cmdDelMeas.Enabled = False End If If tabTake.Tab = 1 And Not cmdSaveMat.Enabled Then cmdSaveMat.Enabled = True cmdAddMat.Enabled = False cmdDelMat.Enabled = False cmdDel1900.Enabled = False End If If tabTake.Tab = 2 And Not cmdSaveOpt.Enabled Then cmdSaveOpt.Enabled = True cmdAddOpt.Enabled = False cmdDelOpt.Enabled = False cmdCopyOpt.Enabled = False cmdSaveOptMat.Enabled = True cmdAddOptMat.Enabled = False cmdDelOptMat.Enabled = False End If End If End If Exit Sub Error_EH: gstrMODULE = "Form Take - Module Form_KeyDown" Call ErrorHandler2 gstrMODULE = "" Exit Sub End Sub Private Sub txtOMInvNo_GotFocus() Call FieldSelect(txtOMInvNo) End Sub Private Sub txtOMMetL_GotFocus() Call FieldSelect(txtOMMetL) End Sub Private Sub txtOMPrice_GotFocus() Call FieldSelect(txtOMPrice) End Sub Private Sub txtOMQty_GotFocus() Call FieldSelect(txtOMQty) End Sub Private Sub txtOpenings_GotFocus() Call FieldSelect(txtOpenings) End Sub Private Sub txtOpenings_LostFocus() txtOpenings = Format(txtOpenings, "#,#") End Sub Private Sub txtOYdge_GotFocus() Call FieldSelect(txtOYdge) End Sub Private Sub txtPrcntge_GotFocus() Call FieldSelect(txtPrcntge) End Sub Private Sub txtSandPrice_GotFocus() Call FieldSelect(txtSandPrice) End Sub Private Sub UpTexture() If optPTex(3) Then mstrFINISH = "SK" ElseIf optPTex(4) Then mstrFINISH = "DA" ElseIf optPTex(0) Then mstrFINISH = "SA" ElseIf optPTex(9) Then mstrFINISH = "SB" ElseIf optPTex(1) Then mstrFINISH = "S2" ElseIf optPTex(2) Then mstrFINISH = "S3" ElseIf optPTex(8) Then mstrFINISH = "DF" ElseIf optPTex(5) Then mstrFINISH = "SM" ElseIf optPTex(7) Then mstrFINISH = "QU" ElseIf optPTex(6) Then mstrFINISH = "MN" ElseIf optPTex(10) Then mstrFINISH = "MF" ElseIf optPTex(11) Then mstrFINISH = "SS" End If End Sub Private Sub txtWireAdj_GotFocus() Call FieldSelect(txtWireAdj) End Sub Private Sub UpTOID() Dim oRS As Recordset Dim strSQL As String strSQL = "SELECT TOID, NEWTOID from tblTAKE where TOID = " & mintOLDTOID Set oRS = New Recordset oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic If Not oRS.EOF Then oRS!NEWTOID = lstMod_Elv.ItemData(lstMod_Elv.ListIndex) oRS.Update End If mintOLDTOID = 0 End Sub