Files
claudetools/clients/valleywide/app-modernization/source-code/Full-Project/VWP_Current_0317/frmTake5.frm
Mike Swanson 5359e7c49e feat(valleywide): recover VWP Orders VB6 source from D: backup drive
Recovered Darv's VB6 source for the Valley Wide Plastering Orders
application from the D: backup drive (label "Backup", 8 TB, 5.3 TB used).
This is the first time we've had the actual source — prior session only
had a single frmPayroll.frm from the AD server.

Three project variants identified across two snapshots:
- Full-Project/   (2,129 files, 124 MB) — D:\Office-Estimates\Darv\Full\Project\
- Kingston-Project/ (2,189 files, 130 MB) — D:\Office-Estimates\Darv\Kingston\Project\
- Source/         (170 files, 559 MB)   — D:\Office-Estimates\Darv\Source\ wholesale
- SOURCE-HOLD/    (3 files, 1 MB)       — D:\Office-Estimates\Darv\SOURCE HOLD\

Latest ORDERS_C.vbp date is 2020-06-09 (Kingston snapshot). Production
Orders_10A.exe was live as of April 2024 — open question whether newer
source exists on other backup drives Mike will scan next.

Also includes per-category and per-keyword analysis CSVs from a WizTree
file-list export, plus the analyzer script that produced them
(re-runnable for the next drive's CSV).

VMs (VWIN7-DW.vdi 8.3 GB + XP-for-ORDERS_copy.vdi 2.8 GB), the live
VWP.mdb, and the 393 MB raw WizTree CSV stay on disk only — gitignored.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 17:36:27 -07:00

11452 lines
383 KiB
Plaintext

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 frmTake5
Caption = "Takeoff Information"
ClientHeight = 8520
ClientLeft = 165
ClientTop = 465
ClientWidth = 11880
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 8520
ScaleWidth = 11880
StartUpPosition = 3 'Windows Default
Begin VB.CheckBox chkP_RL
Alignment = 1 'Right Justify
Caption = "Pulte Special Calculation (RL)"
Height = 195
Left = 3870
TabIndex = 251
Top = 0
Width = 2400
End
Begin VB.CheckBox chkUpdate
Alignment = 1 'Right Justify
Caption = "Update:"
Height = 360
Left = 375
TabIndex = 217
Top = 1050
Width = 930
End
Begin VB.TextBox txtInvType
Height = 285
Left = 11520
TabIndex = 215
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 = 212
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 = 211
Top = 1020
Width = 1155
End
Begin VB.TextBox txt108
Height = 315
Left = 10980
TabIndex = 204
Top = 2520
Width = 855
End
Begin VB.TextBox txt68
Height = 315
Left = 9060
TabIndex = 201
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 = 199
Top = 1980
Width = 1515
End
Begin VB.CheckBox chkOpen
Alignment = 1 'Right Justify
Caption = "Remove Openings From Order Materials:"
Height = 195
Left = 420
TabIndex = 198
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 = 190
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 = 185
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 = 10620
TabIndex = 182
TabStop = 0 'False
Top = 3060
Width = 1275
End
Begin Crystal.CrystalReport crTake
Left = 10200
Top = -30
_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 = 173
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 = 172
TabStop = 0 'False
Top = 3060
Width = 1275
End
Begin VB.TextBox txtProject
Enabled = 0 'False
Height = 285
Left = 720
TabIndex = 167
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 = 166
TabStop = 0 'False
Top = 570
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 = 165
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 = 124
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 = 121
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 = 120
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 = 119
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 = 118
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 = 117
TabStop = 0 'False
Top = 1965
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 = "frmTake5.frx":0000
Left = 8520
List = "frmTake5.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 = 4845
Left = 60
TabIndex = 2
TabStop = 0 'False
Top = 3645
Width = 11475
_ExtentX = 20241
_ExtentY = 8546
_Version = 393216
Tabs = 4
Tab = 3
TabsPerRow = 4
TabHeight = 520
BackColor = -2147483644
TabCaption(0) = "Mea&Surements"
TabPicture(0) = "frmTake5.frx":0004
Tab(0).ControlEnabled= 0 'False
Tab(0).Control(0)= "txtMeType"
Tab(0).Control(1)= "cboMeLocate"
Tab(0).Control(2)= "txtMeSqFt"
Tab(0).Control(3)= "txtMeDesc"
Tab(0).Control(4)= "lstMeasure"
Tab(0).Control(4).Enabled= 0 'False
Tab(0).Control(5)= "cmdUpMeasCalc"
Tab(0).Control(5).Enabled= 0 'False
Tab(0).Control(6)= "cmdSaveMeas"
Tab(0).Control(7)= "cmdDelMeas"
Tab(0).Control(7).Enabled= 0 'False
Tab(0).Control(8)= "cmdAddMeas"
Tab(0).Control(9)= "fraYardage"
Tab(0).Control(10)= "lblMeType"
Tab(0).Control(11)= "lblMeLocate"
Tab(0).Control(12)= "lblMeSqFt"
Tab(0).Control(13)= "lblMeDesc"
Tab(0).ControlCount= 14
TabCaption(1) = "Ma&Terials"
TabPicture(1) = "frmTake5.frx":0020
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "cmdUpdate"
Tab(1).Control(1)= "fraMaterials"
Tab(1).Control(2)= "cmdDel1900"
Tab(1).Control(3)= "chkCalc"
Tab(1).Control(3).Enabled= 0 'False
Tab(1).Control(4)= "cmdSetup"
Tab(1).Control(4).Enabled= 0 'False
Tab(1).Control(5)= "lstMInventory"
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) = "frmTake5.frx":003C
Tab(2).ControlEnabled= 0 'False
Tab(2).Control(0)= "lblYrdge"
Tab(2).Control(1)= "lblBAmt"
Tab(2).Control(2)= "lblOTexture"
Tab(2).Control(3)= "lblOFin2"
Tab(2).Control(4)= "lblOFadj"
Tab(2).Control(5)= "lblOMInvNo"
Tab(2).Control(6)= "lblOMDesc"
Tab(2).Control(7)= "lblOMQty"
Tab(2).Control(8)= "lblOMPrice"
Tab(2).Control(9)= "lblOMDFlag"
Tab(2).Control(10)= "lblOMMType"
Tab(2).Control(11)= "lblOMCFlag"
Tab(2).Control(12)= "lblOMMLength"
Tab(2).Control(13)= "lblOStone"
Tab(2).Control(14)= "lblOScaffold"
Tab(2).Control(15)= "Scaf6"
Tab(2).Control(16)= "lblScaf10"
Tab(2).Control(17)= "lblOptNum"
Tab(2).Control(18)= "lstOptions"
Tab(2).Control(18).Enabled= 0 'False
Tab(2).Control(19)= "txtODesc"
Tab(2).Control(20)= "txtOYdge"
Tab(2).Control(21)= "txtOBAmt"
Tab(2).Control(22)= "cboOFinish"
Tab(2).Control(23)= "txtOFin2"
Tab(2).Control(24)= "txtOFAdj"
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(31)= "txtOMDesc"
Tab(2).Control(32)= "txtOMQty"
Tab(2).Control(33)= "txtOMPrice"
Tab(2).Control(34)= "txtOMMetL"
Tab(2).Control(35)= "cboOMDFlag"
Tab(2).Control(36)= "cboOMType"
Tab(2).Control(37)= "cboOMMetal"
Tab(2).Control(38)= "cmdFindOptMat"
Tab(2).Control(39)= "lstInventory"
Tab(2).Control(39).Enabled= 0 'False
Tab(2).Control(40)= "cmdSaveOpt"
Tab(2).Control(41)= "cmdSaveOptMat"
Tab(2).Control(42)= "cmdCopyOpt"
Tab(2).Control(42).Enabled= 0 'False
Tab(2).Control(43)= "txtNote"
Tab(2).Control(44)= "chkOStone"
Tab(2).Control(45)= "txtOST_SqFt"
Tab(2).Control(46)= "chkST_Others"
Tab(2).Control(47)= "chkNoInvoice"
Tab(2).Control(48)= "txtO68"
Tab(2).Control(49)= "txtO108"
Tab(2).ControlCount= 50
TabCaption(3) = "&Prices"
TabPicture(3) = "frmTake5.frx":0058
Tab(3).ControlEnabled= -1 'True
Tab(3).Control(0)= "lblSand"
Tab(3).Control(0).Enabled= 0 'False
Tab(3).Control(1)= "lblX1"
Tab(3).Control(1).Enabled= 0 'False
Tab(3).Control(2)= "lblX2"
Tab(3).Control(2).Enabled= 0 'False
Tab(3).Control(3)= "lblStucLab"
Tab(3).Control(3).Enabled= 0 'False
Tab(3).Control(4)= "lblLathLab"
Tab(3).Control(4).Enabled= 0 'False
Tab(3).Control(5)= "lblMetLab"
Tab(3).Control(5).Enabled= 0 'False
Tab(3).Control(6)= "lblScaf"
Tab(3).Control(6).Enabled= 0 'False
Tab(3).Control(7)= "lblTape"
Tab(3).Control(7).Enabled= 0 'False
Tab(3).Control(8)= "lblMisc"
Tab(3).Control(8).Enabled= 0 'False
Tab(3).Control(9)= "lblTtlMat"
Tab(3).Control(9).Enabled= 0 'False
Tab(3).Control(10)= "lblMatMU"
Tab(3).Control(10).Enabled= 0 'False
Tab(3).Control(11)= "lblLaborBurden"
Tab(3).Control(11).Enabled= 0 'False
Tab(3).Control(12)= "lblTtlCost"
Tab(3).Control(12).Enabled= 0 'False
Tab(3).Control(13)= "lblMarkup"
Tab(3).Control(13).Enabled= 0 'False
Tab(3).Control(14)= "lblOH"
Tab(3).Control(14).Enabled= 0 'False
Tab(3).Control(15)= "Line1"
Tab(3).Control(15).Enabled= 0 'False
Tab(3).Control(16)= "Line2"
Tab(3).Control(16).Enabled= 0 'False
Tab(3).Control(17)= "lblBidPrice"
Tab(3).Control(17).Enabled= 0 'False
Tab(3).Control(18)= "lblBidwCMU"
Tab(3).Control(18).Enabled= 0 'False
Tab(3).Control(19)= "lblCMUPr"
Tab(3).Control(19).Enabled= 0 'False
Tab(3).Control(20)= "lblSQYDPR"
Tab(3).Control(20).Enabled= 0 'False
Tab(3).Control(21)= "Line3"
Tab(3).Control(21).Enabled= 0 'False
Tab(3).Control(22)= "lblBurDesc"
Tab(3).Control(22).Enabled= 0 'False
Tab(3).Control(23)= "Line4"
Tab(3).Control(23).Enabled= 0 'False
Tab(3).Control(24)= "lblPrimary"
Tab(3).Control(24).Enabled= 0 'False
Tab(3).Control(25)= "lblOptTextures"
Tab(3).Control(25).Enabled= 0 'False
Tab(3).Control(26)= "lbl2S"
Tab(3).Control(26).Enabled= 0 'False
Tab(3).Control(27)= "lblNumber"
Tab(3).Control(27).Enabled= 0 'False
Tab(3).Control(28)= "lblPrice"
Tab(3).Control(28).Enabled= 0 'False
Tab(3).Control(29)= "lblTex1"
Tab(3).Control(29).Enabled= 0 'False
Tab(3).Control(30)= "lblTex2"
Tab(3).Control(30).Enabled= 0 'False
Tab(3).Control(31)= "lblTex3"
Tab(3).Control(31).Enabled= 0 'False
Tab(3).Control(32)= "lblTex4"
Tab(3).Control(32).Enabled= 0 'False
Tab(3).Control(33)= "lblFDesc1"
Tab(3).Control(33).Enabled= 0 'False
Tab(3).Control(34)= "lblFDesc2"
Tab(3).Control(34).Enabled= 0 'False
Tab(3).Control(35)= "lblFDesc3"
Tab(3).Control(35).Enabled= 0 'False
Tab(3).Control(36)= "lblFDesc4"
Tab(3).Control(36).Enabled= 0 'False
Tab(3).Control(37)= "lblT1"
Tab(3).Control(37).Enabled= 0 'False
Tab(3).Control(38)= "lblT2"
Tab(3).Control(38).Enabled= 0 'False
Tab(3).Control(39)= "lblT3"
Tab(3).Control(39).Enabled= 0 'False
Tab(3).Control(40)= "lblT4"
Tab(3).Control(40).Enabled= 0 'False
Tab(3).Control(41)= "lblBagSand"
Tab(3).Control(41).Enabled= 0 'False
Tab(3).Control(42)= "txtSandTons"
Tab(3).Control(42).Enabled= 0 'False
Tab(3).Control(43)= "txtSandPrice"
Tab(3).Control(43).Enabled= 0 'False
Tab(3).Control(44)= "txtSandAmt"
Tab(3).Control(44).Enabled= 0 'False
Tab(3).Control(45)= "txtSLRate"
Tab(3).Control(45).Enabled= 0 'False
Tab(3).Control(46)= "txtStucLab"
Tab(3).Control(46).Enabled= 0 'False
Tab(3).Control(47)= "txtLLRate"
Tab(3).Control(47).Enabled= 0 'False
Tab(3).Control(48)= "txtLathLab"
Tab(3).Control(48).Enabled= 0 'False
Tab(3).Control(49)= "txtMLRate"
Tab(3).Control(49).Enabled= 0 'False
Tab(3).Control(50)= "txtMetLab"
Tab(3).Control(50).Enabled= 0 'False
Tab(3).Control(51)= "txtMetalFt"
Tab(3).Control(51).Enabled= 0 'False
Tab(3).Control(52)= "txtSGRate"
Tab(3).Control(52).Enabled= 0 'False
Tab(3).Control(53)= "txtScafGas"
Tab(3).Control(53).Enabled= 0 'False
Tab(3).Control(54)= "txtTPRate"
Tab(3).Control(54).Enabled= 0 'False
Tab(3).Control(55)= "txtTape"
Tab(3).Control(55).Enabled= 0 'False
Tab(3).Control(56)= "txtTtlMat"
Tab(3).Control(56).Enabled= 0 'False
Tab(3).Control(57)= "txtMisc"
Tab(3).Control(57).Enabled= 0 'False
Tab(3).Control(58)= "txtMatMU"
Tab(3).Control(58).Enabled= 0 'False
Tab(3).Control(59)= "txtLabBur"
Tab(3).Control(59).Enabled= 0 'False
Tab(3).Control(60)= "txtTtlCost"
Tab(3).Control(60).Enabled= 0 'False
Tab(3).Control(61)= "txtMURate"
Tab(3).Control(61).Enabled= 0 'False
Tab(3).Control(62)= "txtTtlMU"
Tab(3).Control(62).Enabled= 0 'False
Tab(3).Control(63)= "txtOH"
Tab(3).Control(63).Enabled= 0 'False
Tab(3).Control(64)= "txtOHRate"
Tab(3).Control(64).Enabled= 0 'False
Tab(3).Control(65)= "txtBidPrice"
Tab(3).Control(65).Enabled= 0 'False
Tab(3).Control(66)= "txtBidPrwCMU"
Tab(3).Control(66).Enabled= 0 'False
Tab(3).Control(67)= "txtCMURate"
Tab(3).Control(67).Enabled= 0 'False
Tab(3).Control(68)= "txtCMUPrice"
Tab(3).Control(68).Enabled= 0 'False
Tab(3).Control(69)= "txtPrSQYD"
Tab(3).Control(69).Enabled= 0 'False
Tab(3).Control(70)= "txtBidPr1"
Tab(3).Control(70).Enabled= 0 'False
Tab(3).Control(71)= "txtBidPr2"
Tab(3).Control(71).Enabled= 0 'False
Tab(3).Control(72)= "txtBidPr3"
Tab(3).Control(72).Enabled= 0 'False
Tab(3).Control(73)= "txtBidPr4"
Tab(3).Control(73).Enabled= 0 'False
Tab(3).Control(74)= "cmdCalcPrimary"
Tab(3).Control(74).Enabled= 0 'False
Tab(3).Control(75)= "cmdCalcOptTexture"
Tab(3).Control(75).Enabled= 0 'False
Tab(3).Control(76)= "txtMatMURate"
Tab(3).Control(76).Enabled= 0 'False
Tab(3).Control(77)= "cboFinish"
Tab(3).Control(77).Enabled= 0 'False
Tab(3).Control(78)= "fraOptional"
Tab(3).Control(78).Enabled= 0 'False
Tab(3).Control(79)= "fraPrimary"
Tab(3).Control(79).Enabled= 0 'False
Tab(3).Control(80)= "cmdSelectTex1"
Tab(3).Control(80).Enabled= 0 'False
Tab(3).Control(81)= "cmdSelectTex2"
Tab(3).Control(81).Enabled= 0 'False
Tab(3).Control(82)= "cmdSelectTex3"
Tab(3).Control(82).Enabled= 0 'False
Tab(3).Control(83)= "cmdSelectTex4"
Tab(3).Control(83).Enabled= 0 'False
Tab(3).ControlCount= 84
Begin VB.CommandButton cmdSelectTex4
Caption = "Texture 4"
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 = 9570
TabIndex = 242
Top = 3795
Width = 1785
End
Begin VB.CommandButton cmdSelectTex3
Caption = "Texture 3"
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 = 9570
TabIndex = 241
Top = 3435
Width = 1785
End
Begin VB.CommandButton cmdSelectTex2
Caption = "Texture 2"
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 = 9570
TabIndex = 240
Top = 3090
Width = 1785
End
Begin VB.CommandButton cmdSelectTex1
Caption = "Texture 1"
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 = 9570
TabIndex = 235
Top = 2745
Width = 1785
End
Begin VB.Frame fraPrimary
Height = 1365
Left = 9165
TabIndex = 230
Top = 1350
Width = 435
Begin VB.OptionButton optPTex
Caption = "Option4"
Height = 225
Index = 3
Left = 105
TabIndex = 234
Top = 1080
Width = 285
End
Begin VB.OptionButton optPTex
Caption = "Option3"
Height = 225
Index = 2
Left = 105
TabIndex = 233
Top = 765
Width = 285
End
Begin VB.OptionButton optPTex
Caption = "Option2"
Height = 225
Index = 1
Left = 105
TabIndex = 232
Top = 450
Width = 285
End
Begin VB.OptionButton optPTex
Height = 225
Index = 0
Left = 75
TabIndex = 231
Top = 180
Value = -1 'True
Width = 285
End
End
Begin VB.Frame fraOptional
Height = 1365
Left = 9630
TabIndex = 225
Top = 1350
Width = 435
Begin VB.CheckBox chkOpt
Caption = "Check3"
Height = 225
Index = 3
Left = 105
TabIndex = 229
Top = 1080
Width = 240
End
Begin VB.CheckBox chkOpt
Caption = "Check2"
Height = 225
Index = 2
Left = 105
TabIndex = 228
Top = 770
Width = 240
End
Begin VB.CheckBox chkOpt
Caption = "Check1"
Height = 225
Index = 1
Left = 105
TabIndex = 227
Top = 460
Width = 240
End
Begin VB.CheckBox chkOpt
Caption = "Check5"
Height = 225
Index = 0
Left = 105
TabIndex = 226
Top = 150
Width = 240
End
End
Begin LpLib.fpCombo cboFinish
Height = 315
Left = 6690
TabIndex = 218
Top = 2745
Width = 2640
_Version = 196608
_ExtentX = 4657
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Enabled = -1 'True
MousePointer = 0
Object.TabStop = 0 'False
BackColor = -2147483643
ForeColor = -2147483640
Text = ""
Columns = 3
Sorted = 1
SelDrawFocusRect= -1 'True
ColumnSeparatorChar= 9
ColumnSearch = 1
ColumnWidthScale= 2
RowHeight = -1
WrapList = 0 'False
WrapWidth = 0
AutoSearch = 2
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
DataFieldList = ""
ColumnEdit = -1
ColumnBound = -1
Style = 2
MaxDrop = 8
ListWidth = -1
EditHeight = -1
GrayAreaColor = -2147483633
ListLeftOffset = 0
ComboGap = -2
MaxEditLen = 150
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
EnableClickEvent= -1 'True
ListPosition = 0
ButtonThreeDAppearance= 0
OLEDragMode = 0
OLEDropMode = 0
Redraw = -1 'True
AutoSearchFill = 0 'False
AutoSearchFillDelay= 500
EditMarginLeft = 1
EditMarginTop = 1
EditMarginRight = 0
EditMarginBottom= 3
ResizeRowToFont = 0 'False
TextTipMultiLine= 0
AutoMenu = -1 'True
EditAlignH = 0
EditAlignV = 0
ColDesigner = "frmTake5.frx":0074
End
Begin VB.TextBox txtO108
Height = 315
Left = -66660
TabIndex = 209
Top = 2280
Width = 675
End
Begin VB.TextBox txtO68
Height = 315
Left = -66660
TabIndex = 208
Top = 1860
Width = 675
End
Begin VB.CheckBox chkNoInvoice
Alignment = 1 'Right Justify
Caption = "No Invoice"
Height = 195
Left = -71400
TabIndex = 35
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 = -69960
TabIndex = 34
Top = 1260
Width = 1515
End
Begin VB.TextBox txtOST_SqFt
Alignment = 1 'Right Justify
Height = 285
Left = -64665
TabIndex = 32
Top = 1260
Width = 915
End
Begin VB.CheckBox chkOStone
Alignment = 1 'Right Justify
Caption = "Stone Veneer Option:"
Height = 270
Left = -68280
TabIndex = 33
Top = 1200
Width = 1905
End
Begin VB.TextBox txtNote
Height = 975
Left = -74760
MultiLine = -1 'True
TabIndex = 37
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 = -67245
TabIndex = 189
Top = 3720
Width = 1695
End
Begin VB.Frame fraMaterials
BorderStyle = 0 'None
Height = 435
Left = -66780
TabIndex = 186
Top = 3240
Width = 2955
Begin VB.OptionButton optInv
Caption = "Custom Inv."
Height = 195
Index = 1
Left = 1560
TabIndex = 188
Top = 120
Width = 1275
End
Begin VB.OptionButton optInv
Caption = "Full Inv."
Height = 195
Index = 0
Left = 120
TabIndex = 187
Top = 120
Value = -1 'True
Width = 1215
End
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 = 184
Top = 3720
Width = 1695
End
Begin VB.CheckBox chkCalc
Caption = "Calculated"
Height = 315
Left = -64980
TabIndex = 183
TabStop = 0 'False
Top = 480
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 = 174
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 = 1800
TabIndex = 171
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 = -69360
TabIndex = 170
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 = -65400
TabIndex = 47
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 = -69360
TabIndex = 36
Top = 1575
Width = 1695
End
Begin VB.ListBox lstInventory
Height = 1815
Left = -74760
Sorted = -1 'True
TabIndex = 169
TabStop = 0 'False
Top = 660
Visible = 0 'False
Width = 3195
End
Begin VB.ListBox lstMInventory
Height = 2010
Left = -66840
Sorted = -1 'True
TabIndex = 168
TabStop = 0 'False
Top = 1260
Visible = 0 'False
Width = 3075
End
Begin VB.CheckBox chkTransfer
Caption = "No Transfer"
Height = 315
Left = -66360
TabIndex = 155
TabStop = 0 'False
Top = 480
Width = 1215
End
Begin VB.CommandButton cmdFindOptMat
Height = 435
Left = -67140
Picture = "frmTake5.frx":0398
Style = 1 'Graphical
TabIndex = 39
Top = 2700
Width = 435
End
Begin VB.CommandButton cmdFindMat
Height = 435
Left = -67140
Picture = "frmTake5.frx":07DA
Style = 1 'Graphical
TabIndex = 146
Top = 360
Width = 435
End
Begin VB.ComboBox cboOMMetal
Height = 315
ItemData = "frmTake5.frx":0C1C
Left = -65400
List = "frmTake5.frx":0C26
Style = 2 'Dropdown List
TabIndex = 45
Top = 3930
Width = 1275
End
Begin VB.ComboBox cboOMType
Height = 315
ItemData = "frmTake5.frx":0C37
Left = -65400
List = "frmTake5.frx":0C39
Style = 2 'Dropdown List
TabIndex = 44
Top = 3540
Width = 1275
End
Begin VB.ComboBox cboOMDFlag
Height = 315
ItemData = "frmTake5.frx":0C3B
Left = -68160
List = "frmTake5.frx":0C45
Style = 2 'Dropdown List
TabIndex = 43
Top = 4320
Width = 1155
End
Begin VB.TextBox txtOMMetL
Alignment = 1 'Right Justify
Height = 315
Left = -65400
MaxLength = 4
TabIndex = 46
Top = 4320
Width = 915
End
Begin VB.TextBox txtOMPrice
Alignment = 1 'Right Justify
Height = 315
Left = -68160
MaxLength = 6
TabIndex = 42
Top = 3930
Width = 915
End
Begin VB.TextBox txtOMQty
Alignment = 1 'Right Justify
Height = 315
Left = -68160
MaxLength = 4
TabIndex = 41
Top = 3540
Width = 915
End
Begin VB.TextBox txtOMDesc
Height = 315
Left = -68160
MaxLength = 50
TabIndex = 40
Top = 3165
Width = 4275
End
Begin VB.TextBox txtOMInvNo
Alignment = 1 'Right Justify
Height = 315
Left = -68160
MaxLength = 5
TabIndex = 38
Top = 2760
Width = 915
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 = 156
TabStop = 0 'False
Top = 4260
Width = 1695
End
Begin VB.ComboBox cboMetal
Height = 315
ItemData = "frmTake5.frx":0C59
Left = -68100
List = "frmTake5.frx":0C63
Style = 2 'Dropdown List
TabIndex = 152
Top = 2640
Width = 1155
End
Begin VB.ComboBox cboMType
Height = 315
ItemData = "frmTake5.frx":0C74
Left = -68100
List = "frmTake5.frx":0C76
Style = 2 'Dropdown List
TabIndex = 151
Top = 2280
Width = 1155
End
Begin VB.ComboBox cboDFlag
Height = 315
ItemData = "frmTake5.frx":0C78
Left = -68100
List = "frmTake5.frx":0C82
Style = 2 'Dropdown List
TabIndex = 150
Top = 1920
Width = 1155
End
Begin VB.TextBox txtMetLength
Alignment = 1 'Right Justify
Height = 315
Left = -68100
MaxLength = 4
TabIndex = 153
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 = 149
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 = 148
Top = 1200
Width = 915
End
Begin VB.TextBox txtMatDesc
BackColor = &H00FFFFFF&
Height = 315
Left = -68100
MaxLength = 50
TabIndex = 147
Top = 840
Width = 4275
End
Begin VB.TextBox txtMatInvNo
BackColor = &H00FFFFFF&
Height = 315
Left = -68100
MaxLength = 5
TabIndex = 145
Top = 480
Width = 915
End
Begin VB.ListBox lstTOMatrl
Height = 4155
Left = -74820
TabIndex = 135
TabStop = 0 'False
Top = 480
Width = 5535
End
Begin VB.TextBox txtMeType
Height = 315
Left = -65520
MaxLength = 1
TabIndex = 133
Top = 1080
Width = 915
End
Begin VB.ComboBox cboMeLocate
Height = 315
ItemData = "frmTake5.frx":0C96
Left = -69720
List = "frmTake5.frx":0C98
Style = 2 'Dropdown List
TabIndex = 132
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 = 131
Top = 600
Width = 915
End
Begin VB.TextBox txtMeDesc
Height = 315
Left = -70380
MaxLength = 30
TabIndex = 130
Top = 600
Width = 2835
End
Begin VB.ListBox lstMeasure
Height = 2205
Left = -74760
TabIndex = 125
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 = 123
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 = 134
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 = 116
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 = 136
Top = 2940
Width = 2115
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 = 154
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 = 115
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 = 4920
TabIndex = 114
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 = 3540
TabIndex = 113
TabStop = 0 'False
Top = 4005
Width = 1215
End
Begin VB.TextBox txtBidPr4
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 = 10215
TabIndex = 112
TabStop = 0 'False
Top = 2385
Width = 1155
End
Begin VB.TextBox txtBidPr3
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 = 10215
TabIndex = 111
TabStop = 0 'False
Top = 2070
Width = 1155
End
Begin VB.TextBox txtBidPr2
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 = 10215
TabIndex = 110
TabStop = 0 'False
Top = 1755
Width = 1155
End
Begin VB.TextBox txtBidPr1
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 = 10215
TabIndex = 109
TabStop = 0 'False
Top = 1425
Width = 1155
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 = 5400
TabIndex = 106
TabStop = 0 'False
Top = 3360
Width = 855
End
Begin VB.TextBox txtCMUPrice
Alignment = 1 'Right Justify
BackColor = &H00FFFF80&
Enabled = 0 'False
Height = 315
Left = 5400
MaxLength = 6
TabIndex = 65
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 = 4560
TabIndex = 104
TabStop = 0 'False
Top = 3000
Width = 615
End
Begin VB.TextBox txtBidPrwCMU
Alignment = 1 'Right Justify
BackColor = &H00FFFF80&
Enabled = 0 'False
Height = 375
Left = 5100
MaxLength = 8
TabIndex = 64
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 = 5100
TabIndex = 66
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 = 4560
TabIndex = 103
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 = 5400
TabIndex = 102
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 = 5400
TabIndex = 101
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 = 4560
TabIndex = 100
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 = 5400
TabIndex = 99
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 = 2640
TabIndex = 91
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 = 2640
TabIndex = 89
TabStop = 0 'False
Top = 3300
Width = 825
End
Begin VB.TextBox txtMisc
Alignment = 1 'Right Justify
Height = 315
Left = 2640
MaxLength = 6
TabIndex = 63
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 = 2640
TabIndex = 86
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 = 2640
TabIndex = 85
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 = 1800
TabIndex = 84
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 = 2640
TabIndex = 83
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 = 1800
TabIndex = 82
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 = 120
TabIndex = 81
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 = 2640
TabIndex = 80
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 = 1800
TabIndex = 79
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 = 2640
TabIndex = 78
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 = 1800
TabIndex = 77
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 = 2640
TabIndex = 76
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 = 1800
TabIndex = 75
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 = 2640
TabIndex = 68
TabStop = 0 'False
Top = 420
Width = 825
End
Begin VB.TextBox txtSandPrice
Alignment = 1 'Right Justify
Height = 315
Left = 1800
MaxLength = 6
TabIndex = 62
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 = 900
TabIndex = 60
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 = -65400
TabIndex = 58
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 = -65400
TabIndex = 57
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 = -71340
TabIndex = 56
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 = -71340
TabIndex = 55
TabStop = 0 'False
Top = 1575
Width = 1695
End
Begin VB.ListBox lstOptMatrl
Height = 840
Left = -74760
TabIndex = 54
TabStop = 0 'False
Top = 3720
Width = 5475
End
Begin VB.TextBox txtOFAdj
Alignment = 1 'Right Justify
Height = 285
Left = -64665
MaxLength = 4
TabIndex = 31
Top = 660
Width = 915
End
Begin VB.TextBox txtOFin2
Alignment = 1 'Right Justify
Height = 315
Left = -66885
MaxLength = 4
TabIndex = 30
Top = 840
Width = 915
End
Begin VB.ComboBox cboOFinish
Height = 315
ItemData = "frmTake5.frx":0C9A
Left = -70305
List = "frmTake5.frx":0C9C
Style = 2 'Dropdown List
TabIndex = 29
Top = 840
Width = 2235
End
Begin VB.TextBox txtOBAmt
Alignment = 1 'Right Justify
Height = 285
Left = -64665
MaxLength = 6
TabIndex = 28
Top = 345
Width = 915
End
Begin VB.TextBox txtOYdge
Alignment = 1 'Right Justify
Height = 315
Left = -66900
MaxLength = 4
TabIndex = 27
Top = 495
Width = 915
End
Begin VB.TextBox txtODesc
Height = 315
Left = -71340
MaxLength = 30
TabIndex = 26
Top = 495
Width = 3495
End
Begin VB.ListBox lstOptions
Height = 2010
Left = -74760
TabIndex = 25
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 = -68715
TabIndex = 175
Top = 2190
Width = 4995
Begin VB.TextBox txtSLabAdj
Height = 315
Left = 3960
TabIndex = 19
Top = 1140
Width = 795
End
Begin VB.TextBox txtWireAdj
Alignment = 1 'Right Justify
Height = 315
Left = 3975
MaxLength = 4
TabIndex = 20
Top = 1560
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 = 21
Top = 1980
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 lblSLabAdj
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "S. Labor Adj. Ydge:"
Height = 195
Left = 2505
TabIndex = 252
Top = 1200
Width = 1380
End
Begin VB.Label lblWireAdj
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Wire Adj. Ydge:"
Height = 195
Left = 2745
TabIndex = 193
Top = 1620
Width = 1110
End
Begin VB.Label lblStone
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Stone V. Sq Ft:"
Height = 195
Left = 225
TabIndex = 191
Top = 1620
Width = 1080
End
Begin VB.Label lblFin2
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Finish 2 Yardage:"
Height = 195
Left = 2625
TabIndex = 181
Top = 2040
Width = 1230
End
Begin VB.Label lblLaborAdj
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "L. Labor Adj. Ydge:"
Height = 195
Left = 2520
TabIndex = 180
Top = 780
Width = 1365
End
Begin VB.Label lblFoamAdj
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Foam Adj. Ydge:"
Height = 195
Left = 2700
TabIndex = 179
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 = 178
Top = 1200
Width = 825
End
Begin VB.Label lblOpenings
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Total Openings:"
Height = 195
Left = 180
TabIndex = 177
Top = 360
Width = 1125
End
Begin VB.Label lblPrcntge
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Percentage:"
Height = 195
Left = 435
TabIndex = 176
Top = 780
Width = 870
End
End
Begin VB.Label lblOptNum
Height = 270
Left = -74760
TabIndex = 250
Top = 375
Width = 2400
End
Begin VB.Label lblBagSand
AutoSize = -1 'True
Caption = "Bag Sand/PreMix Stucco Takeoff"
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 = 6690
TabIndex = 248
Top = 480
Width = 3975
End
Begin VB.Label lblT4
Height = 285
Left = 6405
TabIndex = 247
Top = 2385
Width = 315
End
Begin VB.Label lblT3
Height = 285
Left = 6405
TabIndex = 246
Top = 2085
Width = 315
End
Begin VB.Label lblT2
Height = 285
Left = 6405
TabIndex = 245
Top = 1770
Width = 315
End
Begin VB.Label lblT1
Height = 285
Left = 6405
TabIndex = 244
Top = 1455
Width = 315
End
Begin VB.Label lblFDesc4
Alignment = 1 'Right Justify
Height = 240
Left = 6765
TabIndex = 239
Top = 2430
Width = 2340
End
Begin VB.Label lblFDesc3
Alignment = 1 'Right Justify
Height = 240
Left = 6765
TabIndex = 238
Top = 2130
Width = 2340
End
Begin VB.Label lblFDesc2
Alignment = 1 'Right Justify
Height = 240
Left = 6765
TabIndex = 237
Top = 1815
Width = 2340
End
Begin VB.Label lblFDesc1
Alignment = 1 'Right Justify
Height = 240
Left = 6780
TabIndex = 236
Top = 1500
Width = 2340
End
Begin VB.Label lblTex4
Alignment = 1 'Right Justify
Height = 270
Left = 6600
TabIndex = 224
Top = 2430
Width = 2490
End
Begin VB.Label lblTex3
Alignment = 1 'Right Justify
Height = 270
Left = 6600
TabIndex = 223
Top = 2130
Width = 2490
End
Begin VB.Label lblTex2
Alignment = 1 'Right Justify
Height = 270
Left = 6600
TabIndex = 222
Top = 1830
Width = 2490
End
Begin VB.Label lblTex1
Alignment = 1 'Right Justify
Height = 270
Left = 6990
TabIndex = 221
Top = 1530
Width = 2100
End
Begin VB.Label lblPrice
Alignment = 2 'Center
Caption = "Price"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 10350
TabIndex = 220
Top = 1095
Width = 990
End
Begin VB.Label lblNumber
Caption = "1 2 3 4"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1185
Left = 10050
TabIndex = 219
Top = 1455
Width = 195
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 = 375
TabIndex = 210
Top = 1920
Width = 240
End
Begin VB.Label lblScaf10
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "10'8"""
Height = 195
Left = -67140
TabIndex = 207
Top = 2340
Width = 375
End
Begin VB.Label Scaf6
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "6'8"""
Height = 195
Left = -67050
TabIndex = 206
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 = -67380
TabIndex = 205
Top = 1560
Width = 1695
End
Begin VB.Label lblOStone
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Stone V. Option Sq Ft:"
Height = 195
Left = -66285
TabIndex = 192
Top = 1230
Width = 1590
End
Begin VB.Label lblOMMLength
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Metal Length:"
Height = 195
Left = -66420
TabIndex = 164
Top = 4380
Width = 975
End
Begin VB.Label lblOMCFlag
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Metal Flag:"
Height = 195
Left = -66225
TabIndex = 163
Top = 3990
Width = 780
End
Begin VB.Label lblOMMType
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Material Type:"
Height = 195
Left = -66450
TabIndex = 162
Top = 3600
Width = 1005
End
Begin VB.Label lblOMDFlag
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Delivery Flag:"
Height = 195
Left = -69180
TabIndex = 161
Top = 4380
Width = 960
End
Begin VB.Label lblOMPrice
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Price:"
Height = 195
Left = -68625
TabIndex = 160
Top = 3990
Width = 405
End
Begin VB.Label lblOMQty
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Quantity:"
Height = 195
Left = -68850
TabIndex = 159
Top = 3600
Width = 630
End
Begin VB.Label lblOMDesc
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Description:"
Height = 195
Left = -69060
TabIndex = 158
Top = 3210
Width = 840
End
Begin VB.Label lblOMInvNo
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Inventory No:"
Height = 195
Left = -69180
TabIndex = 157
Top = 2820
Width = 960
End
Begin VB.Label lblMatDesc
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Description:"
Height = 195
Left = -68985
TabIndex = 144
Top = 900
Width = 840
End
Begin VB.Label lblMetLength
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Metal Length:"
Height = 195
Left = -69120
TabIndex = 143
Top = 3060
Width = 975
End
Begin VB.Label lblMetal
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Metal Flag:"
Height = 195
Left = -68925
TabIndex = 142
Top = 2700
Width = 780
End
Begin VB.Label lblMType
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Material Type:"
Height = 195
Left = -69150
TabIndex = 141
Top = 2340
Width = 1005
End
Begin VB.Label lblDFlag
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Delivery Type:"
Height = 195
Left = -69165
TabIndex = 140
Top = 1980
Width = 1020
End
Begin VB.Label lblMatPrice
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Unit Price:"
Height = 195
Left = -68880
TabIndex = 139
Top = 1620
Width = 735
End
Begin VB.Label lblMatQty
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Quantity:"
Height = 195
Left = -68775
TabIndex = 138
Top = 1260
Width = 630
End
Begin VB.Label lblInvno
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Inventory No:"
Height = 195
Left = -69105
TabIndex = 137
Top = 540
Width = 960
End
Begin VB.Label lblMeType
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Measurement Type:"
Height = 195
Left = -67080
TabIndex = 129
Top = 1140
Width = 1410
End
Begin VB.Label lblMeLocate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Measurement Location:"
Height = 195
Left = -71460
TabIndex = 128
Top = 1140
Width = 1665
End
Begin VB.Label lblMeSqFt
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Square Feet:"
Height = 195
Left = -66600
TabIndex = 127
Top = 660
Width = 915
End
Begin VB.Label lblMeDesc
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Description:"
Height = 195
Left = -71460
TabIndex = 126
Top = 660
Width = 840
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 = 9585
TabIndex = 108
Top = 975
Width = 825
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 = 8850
TabIndex = 107
Top = 975
Width = 735
End
Begin VB.Line Line4
BorderWidth = 2
X1 = 6360
X2 = 6375
Y1 = 360
Y2 = 5205
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 = 240
TabIndex = 105
Top = 3780
Width = 1155
End
Begin VB.Line Line3
BorderWidth = 2
X1 = 3540
X2 = 6360
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 = 3840
TabIndex = 98
Top = 3420
Width = 1485
End
Begin VB.Label lblCMUPr
AutoSize = -1 'True
Caption = "CMU Price:"
Height = 195
Left = 3600
TabIndex = 97
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 = 3660
TabIndex = 96
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 = 3780
TabIndex = 95
Top = 1740
Width = 1185
End
Begin VB.Line Line2
BorderWidth = 2
X1 = 3540
X2 = 6360
Y1 = 1560
Y2 = 1560
End
Begin VB.Line Line1
BorderWidth = 2
X1 = 2460
X2 = 3420
Y1 = 4080
Y2 = 4080
End
Begin VB.Label lblOH
Caption = "Overhead:"
Height = 195
Left = 3720
TabIndex = 94
Top = 1200
Width = 795
End
Begin VB.Label lblMarkup
AutoSize = -1 'True
Caption = "Markup:"
Height = 195
Left = 3900
TabIndex = 93
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 = 4170
TabIndex = 92
Top = 480
Width = 945
End
Begin VB.Label lblLaborBurden
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Labor Burden:"
Height = 195
Left = 1530
TabIndex = 90
Top = 3720
Width = 1005
End
Begin VB.Label lblMatMU
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Material Markup:"
Height = 195
Left = 540
TabIndex = 88
Top = 3360
Width = 1185
End
Begin VB.Label lblTtlMat
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Total Materials:"
Height = 195
Left = 1395
TabIndex = 87
Top = 3000
Width = 1080
End
Begin VB.Label lblMisc
AutoSize = -1 'True
Caption = "Misc. Items Cost:"
Height = 195
Left = 1260
TabIndex = 74
Top = 2640
Width = 1200
End
Begin VB.Label lblTape
AutoSize = -1 'True
Caption = "Tape/Plastic:"
Height = 195
Left = 825
TabIndex = 73
Top = 2280
Width = 960
End
Begin VB.Label lblScaf
AutoSize = -1 'True
Caption = "Scaffold && Gas:"
Height = 195
Left = 690
TabIndex = 72
Top = 1920
Width = 1095
End
Begin VB.Label lblMetLab
AutoSize = -1 'True
Caption = "Metal Labor:"
Height = 195
Left = 900
TabIndex = 71
Top = 1560
Width = 885
End
Begin VB.Label lblLathLab
AutoSize = -1 'True
Caption = "Lath Labor:"
Height = 195
Left = 975
TabIndex = 70
Top = 1200
Width = 810
End
Begin VB.Label lblStucLab
AutoSize = -1 'True
Caption = "Stucco Labor:"
Height = 195
Left = 780
TabIndex = 69
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 = 2460
TabIndex = 67
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 = 1560
TabIndex = 61
Top = 480
Width = 150
End
Begin VB.Label lblSand
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Sand:"
Height = 195
Left = 465
TabIndex = 59
Top = 480
Width = 420
End
Begin VB.Label lblOFadj
AutoSize = -1 'True
Caption = "Foam Adj. Ydge:"
Height = 195
Left = -65865
TabIndex = 53
Top = 900
Width = 1170
End
Begin VB.Label lblOFin2
AutoSize = -1 'True
Caption = "Finish 2 Ydge:"
Height = 195
Left = -67965
TabIndex = 52
Top = 900
Width = 1005
End
Begin VB.Label lblOTexture
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Option Texture:"
Height = 195
Left = -71505
TabIndex = 51
Top = 900
Width = 1095
End
Begin VB.Label lblBAmt
AutoSize = -1 'True
Caption = "Billing Amount:"
Height = 195
Left = -65745
TabIndex = 50
Top = 555
Width = 1035
End
Begin VB.Label lblYrdge
AutoSize = -1 'True
Caption = "Yardage:"
Height = 195
Left = -67620
TabIndex = 49
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 = 48
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 lblFixLbr
Alignment = 2 'Center
Caption = "Fix 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
ForeColor = &H000000FF&
Height = 450
Left = 2850
TabIndex = 249
Top = 660
Visible = 0 'False
Width = 975
End
Begin VB.Label lblTexCode
Height = 315
Left = 6765
TabIndex = 243
Top = 600
Width = 435
End
Begin VB.Label lblProject
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Project:"
Height = 195
Left = 60
TabIndex = 216
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 = 214
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 = 213
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 = 203
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 = 202
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 = 200
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 = 197
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 = 196
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 = 195
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 = 194
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 = 122
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 = 24
Top = 1380
Width = 690
End
Begin VB.Label lblOneKote
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Stucco Type:"
Height = 195
Left = 7395
TabIndex = 23
Top = 660
Width = 1020
End
Begin VB.Label lblFinish
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Texture:"
Height = 195
Left = 3930
TabIndex = 22
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 = "frmTake5"
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, moRSTMAT As Recordset
Dim moRSOpt As Recordset
Dim moRSOptMat As Recordset
Dim moRSProj As Recordset
Dim moRSLAB As Recordset, mboolBAG100 As Boolean, mboolSilica As Boolean
Dim mintOLDTOID As Long, mboolBAD As Boolean, mboolPSW As Boolean
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, mintBOOKMARK12 As Integer
Dim mintTOID As Long, mintOPTID As Long, mintPROJID As Long, mintTexNum As Integer
Dim mintNTOID As Long, mintNOPTID As Long ', mintPROJID As Long, mintTexNum As Integer
Dim mstrFINISH As String, mboolSETUP As Boolean, mboolMove As Boolean, strTYPE As String
Private Sub TextureLoad2()
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
cboFinish.AddItem oRSFinish("Desc")
cboFinish.ItemData(cboFinish.NewIndex) = Field2Long(oRSFinish("AUTOID"))
cboOFinish.AddItem oRSFinish("Desc")
cboOFinish.ItemData(cboOFinish.NewIndex) = Field2Long(oRSFinish("AUTOID"))
oRSFinish.MoveNext
Loop
oRSFinish.Close
Exit Sub
Error_EH:
gstrMODULE = "Form Plans - Module TextureLoad2"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub cboFinish_Click()
cboFinish.SearchText = ""
End Sub
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 chkOpt(0) = vbUnchecked And Not optPTex(0) Then
txtBidPr1 = ""
If Not IsNull(lblT1) Then
strSQL = "SELECT * FROM tblTOLabor WHERE texture = '" & lblT1 & "' 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
End If
If chkOpt(1) = vbUnchecked And Not optPTex(1) Then
txtBidPr2 = ""
If Not lblT2 = "" Then
' If Not IsNull(lblT2) Then
strSQL = "SELECT * FROM tblTOLabor WHERE texture = '" & lblT2 & "' 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
End If
If chkOpt(2) = vbUnchecked And Not optPTex(2) Then
txtBidPr3 = ""
If Not lblT3 = "" Then
' If Not IsNull(lblT3) Then
strSQL = "SELECT * FROM tblTOLabor WHERE texture = '" & lblT3 & "' 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
End If
If chkOpt(3) = vbUnchecked And Not optPTex(3) Then
txtBidPr4 = ""
If Not lblT4 = "" Then
' If Not IsNull(lblT4) Then
strSQL = "SELECT * FROM tblTOLabor WHERE texture = '" & lblT4 & "' 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
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
' txtBidPr1 = ""
' 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
' txtBidPr2 = ""
' 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
' txtBidPr4 = ""
' 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
Dim dblMETAL As Double, dblSUM As Double, dblSYN As Double
Dim oRS As Recordset, oRSS As Recordset, oRC As Recordset, oRX As Recordset
Dim strSQL As String, strSELECT As String, strCHECK As String, strSQLX As String
Dim boolOK As Boolean, dblWire As Double, dblLC As Double, strSELECT2 As String
Dim dblSandBag As Double, dblBagBatch As Double, lngSandBatch As Long
Dim dblSplitCost As Double, dblTYPAR As Double, intTP9 As Integer, intTP45 As Integer
Dim dbl12F As Double, dblPYRO As Double, dblRL8 As Double
Dim dblTP4, dblTP6, dblTP9, dblTPNail, dblTPCTape As Double
' ****** If errors are reported where quantities are being changed in material
' ****** when not wanted look at this -- oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
On Error GoTo Error_EH
dblRL8 = 0
mboolBAD = False
mboolCALC = False
mboolSilica = 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 = "M" Then 'Pre-Mix 1 Kote
If Field2Str2(moRSProj!sw_adj) > 0 Then
dblKote1 = ((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)))
dblKote1 = Int((dblKote1 * 1) + 0.99)
' dblKote1 = Int((dblKote1 * 4) + 0.99)
' dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99)
Else
dblKote1 = (Field2Str(txtLathYds) / 10)
dblKote1 = Int((dblKote1 * 4) + 0.99)
' 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
' If moRS!stype = "P" Then 'Pre-Mix 1 Kote
' If Field2Str2(moRSProj!sw_adj) > 0 Then
' dblKote1 = Int((Field2Str(txtLathYds) / Field2Str(moRSProj!sw_adj)) + 0.99)
' Else
' dblKote1 = Int((Field2Str(txtLathYds) / 2.5) + 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))
mboolSilica = True
Else
dblS16 = 0
mboolSilica = False
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
' dblS16 = dblBatch * (Field2Integer(oRS!t_s16) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30))
dblS20 = dblBatch * (Field2Integer(oRS!t_s20))
mboolSilica = True
Else
dblS20 = 0
mboolSilica = False
End If
If Field2Str(oRS!t_brs) > 0 Then
If mboolBAG100 Then
dblRS = 0
' dblRS = ((dblKote1 * Field2Integer(oRS!t_brs)) + (dblBatch * (Field2Integer(oRS!t_trs))) + (Field2Integer(oRS!t_xrs)))
' dblS16 = (dblRS)
Else
dblRS = (((dblKote1 * Field2Integer(oRS!t_brs)) + (dblBatch * (Field2Integer(oRS!t_trs))) + (Field2Integer(oRS!t_xrs))) / 2000)
End If
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) + Field2Integer(oRS!t_s20) + Field2Integer(oRS!t_s30)))
dblS16 = dblS16 + (dblBatch * (Field2Integer(oRS!t_s16)))
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, adLockOptimistic
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, adLockOptimistic
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
'****************HOLD
' If mboolBAG100 Then
' dblBAGSAND = Int(((dblCMNT2 + dblKote1) * dblCalcBAGSAND) + 0.99)
' End If
If mboolBAG100 And Not mboolSilica Then
If dblS16 = 0 Then
dblS16 = dblRS
End If
' If dblS16 = 0 Then '************** May need to change this to dblS20
' dblS16 = dblRS
' End If
End If
If mboolPSW Then
' lngSandBatch = dblCMNT '******** complete this
lngSandBatch = dblKote1 + dblCMNT '******** complete this
dblSandBag = lngSandBatch * dblBagBatch
dblSandBag = dblSandBag - dblS16
ElseIf mboolBAG100 And Not mboolSilica Then
lngSandBatch = dblCMNT '******** complete this
' lngSandBatch = dblKote1 + dblCMNT '******** complete this
dblSandBag = lngSandBatch * dblBagBatch
dblSandBag = dblSandBag - dblS16
' dblS16 = dblSandBag
End If
' If mboolBAG100 Then
' lngSandBatch = dblCMNT '******** complete this
' lngSandBatch = dblKote1 + dblCMNT '******** complete this
' dblSandBag = lngSandBatch * dblBagBatch
' dblS16 = dblSandBag
' End If
If dblS16 > 0 And mboolSilica Then
' If mboolSilica 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, adLockOptimistic
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
End If
If dblS20 > 0 And mboolSilica Then
' If mboolSilica 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, adLockOptimistic
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
End If
If dblSandBag > 0 Then
' ElseIf mboolBAG100 Then
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 2350 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
dblS16 = Int((dblS16) + 0.99)
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 2350 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 = dblSandBag
' 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
If dblS16 > 0 Then
moRS!silica = Int((dblS16 * Field2Str(oRSS!tprice)) + 0.99)
ElseIf dblS20 > 0 Then
moRS!silica = Int((dblS20 * Field2Str(oRSS!tprice)) + 0.99)
End If
End If
End If
End If
' ElseIf Not mboolSilica Then
If Not mboolSilica And dblS16 > 0 Then
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 2366 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
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
If Not mboolSilica And dblS20 > 0 Then
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 2366 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
dblS20 = Int((dblS20) + 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 = 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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 1230 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If Not oRC.EOF Then
dbl12F = Field2Str2(oRC!qty)
oRC.Close
End If
dblFOAM = Field2Long(txtLathYds) - Field2Integer(txtFoamAdj)
If moRSProj!ftype = "O" Then
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 1211 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 1211 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)
moRSCMat!qty = Int(((dblFOAM - (dbl12F * 1.77) - (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
' ** Changed to subtract 1/2in foam because of Ryland & Typar
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 = 1211 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 1211 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, adLockOptimistic
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, adLockOptimistic
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 Typar Stucco Wrap
If moRSProj!TYPAR Then
' dblTYPAR = Int((Field2Integer(txtTTLYds) / 90) + 0.99)
' dblTYPAR = Int((Field2Long(txtTTLYds) / 90) + 0.99) 'Changed 7/22/2015 after discussion with BBart/JR
dblTYPAR = Int((Field2Long(txtTTLYds) / 70) + 0.99) 'Changed 11/14/2018 By Jesse - Material from Lot s/b 80
' intTP45 = 1 'combined all typar into 1 calcuation
intTP9 = dblTYPAR '- intTP45 ****************************
dblTP4 = Int((Field2Long(txtTTLYds) / 100) + 0.99)
' dblTP6 = Int((Field2Long(txtTTLYds) / 100) + 0.99)
dblTP9 = Int((Field2Long(txtTTLYds) / 500) + 0.99)
dblTPNail = Int((Field2Long(txtTTLYds) / 500) + 0.99)
dblTPCTape = intTP9
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3300 and toid = " & gintTOID ' To Delete
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
Else
oRC.Delete
End If
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3310 and toid = " & gintTOID 'Typar 9ft X 100ft
' strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3300 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 3310 and Inv_Type = " & gbytINV_TYPE
' strSELECT = "SELECT * FROM tblINVtry where Inv_no = 3300 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 = intTP9
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
oRC!qty = intTP9
oRC.Update
End If
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3324 and toid = " & gintTOID 'Typar 4 IN ACRYLIC FLASHING TAPE
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 3324 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 = (dblTP4 * 2)
moRSCMat!qty = (dblTP4 * 4) ' Changed 11/14/17 per JR so Supers do not need to request more 4"
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
' oRC!qty = (dblTP4 * 2)
oRC!qty = (dblTP4 * 4) ' Changed 11/14/17 per JR so Supers do not need to request more 4"
oRC.Update
End If
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3326 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If Not oRC.EOF Then
oRC.Delete
End If
'Removed on 02/03/2017 because Pulte changed requirements
' strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3326 and toid = " & gintTOID
' Set oRC = New Recordset
' oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
' If oRC.EOF Then
' strSELECT = "SELECT * FROM tblINVtry where Inv_no = 3326 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 = dblTP6
' 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
' oRC!qty = dblTP6
' oRC.Update
' End If
' strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3329 and toid = " & gintTOID
' Set oRC = New Recordset
' oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
'
' If Not oRC.EOF Then
' oRC.Delete
' End If
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3329 and toid = " & gintTOID 'TYPAR 9 IN ACRYLIC FLASHING TAPE
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 3329 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 = 1
' moRSCMat!qty = dblTP9 ' changed because only using a part of a roll
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
' oRC!qty = dblTP9 ' changed because only using a part of a roll
oRC!qty = 1
oRC.Update
End If
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 1831 and toid = " & gintTOID 'PLASTIC CAP NAILS
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 1831 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 = dblTPNail
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
oRC!qty = dblTPNail
oRC.Update
End If
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 3320 and toid = " & gintTOID '2 IN (1 7/8) CONSTRUCTION TAPE
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF Then
strSELECT = "SELECT * FROM tblINVtry where Inv_no = 3320 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 = dblTPCTape
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
oRC!qty = dblTPCTape
oRC.Update
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)
ElseIf moRSProj!bp_type = "BR" Then
dblBP = Int(((Field2Integer(dbl12F * 1.77) / 20)) + 0.99)
Else
dblBP = Int(((Field2Long(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, adLockOptimistic
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, adLockOptimistic
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
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, adLockOptimistic
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
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, adLockOptimistic
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
ElseIf moRSProj!bp_type = "BR" Then
dblBP = Int(((Field2Integer(dbl12F * 1.77) / 20)) + 0.99) ' Changed to match what is being sent out in orders
If dblBP = 0 Then
dblBP = 1
End If
' dblBP = Int(((Field2Integer(dbl12F * 1.77) / 20)) + 0.99)
' dblBP = Int(((Field2Integer(txtLathYds) / 20)) + 0.99)
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 1809 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
If oRC.EOF And dblBP > 0 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
' Else
' moRSCMat!qty = dblBP
' moRSCMat.Update
End If
txtNotes = txtNotes & "CHECK 60 MIN BP CALCULATION"
End If
Else
strCHECK = "SELECT * FROM tblTOMatrl WHERE inv_no = 1810 and toid = " & gintTOID
Set oRC = New Recordset
oRC.Open strCHECK, goConn, adOpenForwardOnly, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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, adLockOptimistic
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
' If Not mboolBAG100 Then
If mboolBAG100 Then
lngSandBatch = dblCMNT '******** complete this
' lngSandBatch = dblKote1 + dblCMNT '******** complete this
dblSandBag = lngSandBatch * dblBagBatch
End If
' If moRSProj!BagSand Then
If mboolBAG100 Then
If dblSandBag > 0 Then
lblSand = "Sand Bags:"
dblSandBag = Int((dblSandBag) + 0.99)
txtSandTons = dblSandBag
Else
txtSandTons = dblRS
End If
Else
If dblRS > 0 Then
lblSand = "Sand Tons:"
dblRS = Int((dblRS) + 0.99)
txtSandTons = dblRS
Else
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) * Field2Str2(txtTPRate)) + 0.99)
txtOH = Int((Field2Long(txtTTLYds) * Field2Str2(txtOHRate)) + 0.99)
txtStucLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtSLabAdj)) * Field2Str2(txtSLRate)) + 0.99)
txtLathLab = Int(((Field2Long(txtLathYds) - Field2Integer(txtLaborAdj)) * Field2Str2(txtLLRate)) + 0.99)
txtMetLab = Int((Field2Str2(txtMetalFt) * Field2Str2(txtMLRate)) + 0.99)
txtCMUPrice = Int((Field2Integer(txtCMUYds) * Field2Str2(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 Take5 - 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
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 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
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 = Field2Str(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((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
' 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)
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 = Field2Integer(!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 strSQLMS As String, strSQLMAT As String, strSQLLAB As String, strSQLOPT As String, strSQLOPTM As String
Dim strPROJCODE As String, strSQL As String, strSQLL As String
Dim strSQLTO As String, strSQLMEAS As String, strSQLTMAT As String
Dim oRS As Recordset, oRSMEAS As Recordset, oRSMAT As Recordset, oRSOPT As Recordset, oRSOPTMAT As Recordset
Dim oRSS As Recordset, oRSTO As Recordset, oRSLAB As Recordset
Dim strNewElv As String
Dim oRSMAX As Recordset, strSQLMAX As String
On Error GoTo Error_EH
mintBOOKMARK12 = lstMod_Elv.ListIndex
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
strNewElv = 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 'Need To Add The Takeoff,Measurements, Materials, Labor, Options and Option Material all in this proceedure
mintPROJID = oRS!PROJ_ID
mboolMove = True
strSQLTO = "SELECT * FROM tblTAKE"
Set oRSTO = New Recordset
oRSTO.Open strSQLTO, goConn, adOpenKeyset, adLockOptimistic
If Not oRSTO.EOF Then
oRSTO.AddNew
oRSTO!PROJ_ID = mintPROJID
oRSTO!pln_elv = moRS!pln_elv
oRSTO!finish = moRS!finish
oRSTO!BIDC = moRS!BIDC
oRSTO!bidp = moRS!bidp
oRSTO!opening = moRS!opening
oRSTO!openpr = moRS!openpr
oRSTO!lath_yds = moRS!lath_yds
oRSTO!TTL_Yds = moRS!TTL_Yds
oRSTO!CMUYDS = moRS!CMUYDS
oRSTO!MATCOST = moRS!MATCOST
oRSTO!MISC = moRS!MISC
oRSTO!SAND_TONS = moRS!SAND_TONS
oRSTO!sand = moRS!sand
oRSTO!stype = moRS!stype
oRSTO!KOTE1 = moRS!KOTE1
oRSTO!SW = moRS!SW
oRSTO!pl = moRS!pl
oRSTO!ll = moRS!ll
oRSTO!METAL = moRS!METAL
oRSTO!mlab = moRS!mlab
oRSTO!cmulab = moRS!cmulab
oRSTO!SL_TG = moRS!SL_TG
oRSTO!tp = moRS!tp
oRSTO!TPE = moRS!TPE
oRSTO!c_l = moRS!c_l
oRSTO!silica = moRS!silica
oRSTO!OH = moRS!OH
oRSTO!mu = moRS!mu
oRSTO!LR = moRS!LR
oRSTO!SR = moRS!SR
oRSTO!MR = moRS!MR
oRSTO!CR = moRS!CR
oRSTO!scr = moRS!scr
oRSTO!BRDN = moRS!BRDN
oRSTO!MTMU = moRS!MTMU
oRSTO!MATMUPR = moRS!MATMUPR
oRSTO!ohp = moRS!ohp
oRSTO!OHPR = moRS!OHPR
oRSTO!LIME2 = moRS!LIME2
oRSTO!fin2 = moRS!fin2
oRSTO!f_adj = moRS!f_adj
oRSTO!l_adj = moRS!l_adj
oRSTO!cladj = moRS!cladj
' oRSTO!Create = moRS!Create
' oRSTO!LSave = moRS!LSave
' oRSTO!LSUser = moRS!LSUser
oRSTO!createuser = gstrLOGIN
oRSTO!notes = moRS!notes
oRSTO!stone = moRS!stone
oRSTO!ST_SQFT = moRS!ST_SQFT
oRSTO!w_adj = moRS!w_adj
' oRSTO!Update = moRS!Update
' oRSTO!LUUser = moRS!LUUser
oRSTO!openflg = moRS!openflg
oRSTO!P_RL = moRS!P_RL
oRSTO!twostory = moRS!twostory
oRSTO!Scaf6 = moRS!Scaf6
oRSTO!scaf10 = moRS!scaf10
oRSTO!Supersede = moRS!Supersede
oRSTO!NEWTOID = moRS!NEWTOID
oRSTO!superdate = moRS!superdate
oRSTO.Update
strSQLMAX = "SELECT Max(TOID) as MAXTOID from tblTAKE"
Set oRSMAX = New Recordset
oRSMAX.Open strSQLMAX, goConn, adOpenForwardOnly, adLockReadOnly
mintNTOID = oRSMAX!MAXToid
oRSMAX.Close
strSQLTO = "SELECT * FROM tblTAKE WHERE TOID = " & mintNTOID
Set oRSTO = New Recordset
oRSTO.Open strSQLTO, goConn, adOpenKeyset, adLockOptimistic
If Not oRSTO.EOF Then
oRSTO!origTOID = mintNTOID
oRSTO.Update
End If
End If
oRSTO.Close
End If
strSQL = "SELECT * FROM tblMEASURE WHERE TOID = " & gintTOID
Set moRSMeas = New Recordset
moRSMeas.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not moRSMeas.EOF Then
strSQLMS = "SELECT * FROM tblMEASURE"
Set oRSMEAS = New Recordset
oRSMEAS.Open strSQLMS, goConn, adOpenKeyset, adLockOptimistic
End If
If Not oRSMEAS.EOF Then
Do Until moRSMeas.EOF
oRSMEAS.AddNew
oRSMEAS!toid = mintNTOID
oRSMEAS!Desc = moRSMeas!Desc
oRSMEAS!sq_yds = moRSMeas!sq_yds
oRSMEAS!Type = moRSMeas!Type
oRSMEAS!Location = moRSMeas!Location
oRSMEAS.Update
moRSMeas.MoveNext
Loop
oRSMEAS.Close
End If
strSQL = "SELECT * FROM tblTOMATRL WHERE TOID = " & gintTOID
Set moRSTMAT = New Recordset
moRSTMAT.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not moRSTMAT.EOF Then
strSQLTMAT = "SELECT * FROM tblTOMATRL"
Set oRSMAT = New Recordset
oRSMAT.Open strSQLTMAT, goConn, adOpenKeyset, adLockOptimistic
End If
If Not oRSMAT.EOF Then
Do Until moRSTMAT.EOF
oRSMAT.AddNew
oRSMAT!toid = mintNTOID
oRSMAT!inv_no = moRSTMAT!inv_no
oRSMAT!Desc = moRSTMAT!Desc
oRSMAT!qty = moRSTMAT!qty
oRSMAT!price = moRSTMAT!price
oRSMAT!d_flag = moRSTMAT!d_flag
oRSMAT!m_type = moRSTMAT!m_type
oRSMAT!calc_flag = moRSTMAT!calc_flag
oRSMAT!calc_amt = moRSTMAT!calc_amt
oRSMAT!trnsflag = moRSTMAT!trnsflag
oRSMAT!cflag = moRSTMAT!cflag
oRSMAT.Update
moRSTMAT.MoveNext
Loop
oRSMAT.Close
End If
strSQL = "SELECT * FROM tblTOLABOR WHERE TOID = " & gintTOID
Set moRSLAB = New Recordset
moRSLAB.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not moRSLAB.EOF Then
strSQLLAB = "SELECT * FROM tblTOLABOR"
Set oRSLAB = New Recordset
oRSLAB.Open strSQLLAB, goConn, adOpenKeyset, adLockOptimistic
End If
If Not oRSLAB.EOF Then
Do Until moRSLAB.EOF
oRSLAB.AddNew
oRSLAB!toid = mintNTOID
oRSLAB!texture = moRSLAB!texture
oRSLAB!l_rate = moRSLAB!l_rate
oRSLAB!s_rate = moRSLAB!s_rate
oRSLAB!m_Rate = moRSLAB!m_Rate
oRSLAB!CMU = moRSLAB!CMU
oRSLAB!matmu = moRSLAB!matmu
oRSLAB!scr = moRSLAB!scr
oRSLAB!tp = moRSLAB!tp
oRSLAB!ohp = moRSLAB!ohp
oRSLAB!mu = moRSLAB!mu
oRSLAB!bidprice = moRSLAB!bidprice
oRSLAB!C_USER = gstrLOGIN
oRSLAB!OptNum = moRSLAB!OptNum
oRSLAB!PTex = moRSLAB!PTex
oRSLAB.Update
moRSLAB.MoveNext
Loop
oRSLAB.Close
End If
strSQL = "SELECT * FROM tblOPTION WHERE TOID = " & gintTOID
Set moRSOpt = New Recordset
moRSOpt.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not moRSOpt.EOF Then
mintOPTID = moRSOpt!OPTID
strSQLOPT = "SELECT * FROM tblOPTION"
Set oRSOPT = New Recordset
oRSOPT.Open strSQLOPT, goConn, adOpenKeyset, adLockOptimistic
End If
If Not oRSOPT.EOF Then
Do Until moRSOpt.EOF
oRSOPT.AddNew
mintOPTID = moRSOpt!OPTID
oRSOPT!toid = mintNTOID
' oRSOPT!OPTID OPTID
oRSOPT!Desc = moRSOpt!Desc
oRSOPT!price = moRSOpt!price
oRSOPT!yards = moRSOpt!yards
oRSOPT!texture = moRSOpt!texture
oRSOPT!fin2 = moRSOpt!fin2
oRSOPT!f_adj = moRSOpt!f_adj
' oRSOPT!NOTES NOTES
oRSOPT!ostone = moRSOpt!ostone
oRSOPT!OSt_SqFt = moRSOpt!OSt_SqFt
oRSOPT!otstone = moRSOpt!otstone
oRSOPT!invoice = moRSOpt!invoice
oRSOPT!Scaf6 = moRSOpt!Scaf6
oRSOPT!scaf10 = moRSOpt!scaf10
oRSOPT.Update
strSQL = "SELECT * FROM tblOPTMATRL WHERE OPTID = " & mintOPTID
Set moRSOptMat = New Recordset
moRSOptMat.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
If Not moRSOptMat.EOF Then
strSQLMAX = "SELECT Max(OPTID) as MAXOPTID from tblOPTION"
Set oRSMAX = New Recordset
oRSMAX.Open strSQLMAX, goConn, adOpenForwardOnly, adLockReadOnly
mintNOPTID = oRSMAX!maxoptid
oRSMAX.Close
strSQLOPTM = "SELECT * FROM tblOPTMatrl" ' WHERE OptID = " & mintNOPTID
Set oRSOPTMAT = New Recordset
oRSOPTMAT.Open strSQLOPTM, goConn, adOpenKeyset, adLockOptimistic
If Not oRSOPTMAT.EOF Then
Do Until moRSOptMat.EOF
oRSOPTMAT.AddNew
oRSOPTMAT!toid = mintNTOID
oRSOPTMAT!OPTID = mintNOPTID
oRSOPTMAT!inv_no = moRSOptMat!inv_no
oRSOPTMAT!Desc = moRSOptMat!Desc
oRSOPTMAT!qty = moRSOptMat!qty
oRSOPTMAT!price = moRSOptMat!price
oRSOPTMAT!d_flag = moRSOptMat!d_flag
oRSOPTMAT!m_type = moRSOptMat!m_type
oRSOPTMAT!calc_flag = moRSOptMat!calc_flag
oRSOPTMAT!calc_amt = moRSOptMat!calc_amt
oRSOPTMAT.Update
moRSOptMat.MoveNext
Loop
End If
End If
moRSOpt.MoveNext
Loop
oRSOPTMAT.Close
oRSOPT.Close
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
MsgBox "Take Off Move Is Complete", vbOKOnly, "Complete"
lstMod_Elv.ListIndex = mintBOOKMARK12
Exit Sub
Error_EH:
gstrMODULE = "Form Take - Module cmdMove_Click"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub cmdMoveOld_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 cmdMove2_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 cmdMove2_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 cmdPrintTake_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 = Field2Integer(!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 = Integer2Field(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 = Integer2Field(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 cmdSelectTex1_Click()
Dim intYN As Integer, oRS As Recordset, strSQL As String
' If chkOpt(0) = vbUnchecked And Not optPTex(0) Then
' txtBidPr1 = ""
' If Not IsNull(lblT1) Then
' strSQL = "SELECT * FROM tblTOLabor WHERE texture = " & lblT1 & " 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
' End If
If lblT1 <> "" Then
intYN = MsgBox("Do You Want To Change The Current Texture 1?", vbYesNo, "Change Texture")
If intYN = vbYes Then
txtBidPr1 = ""
strSQL = "SELECT * FROM tblTOLabor WHERE texture = '" & lblT1 & "' and toid = " & gintTOID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not oRS.EOF Then
oRS.Delete
End If
Else
Exit Sub
End If
End If
cboFinish.col = 1
lblT1 = cboFinish.ColText
mstrFINISH = lblT1
cboFinish.col = 2
lblFDesc1 = cboFinish.ColText
chkOpt(0) = vbChecked
cboFinish.ListIndex = -1
cboFinish.SearchText = ""
mintTexNum = 1
Call GetLabor
End Sub
Private Sub cmdSelectTex2_Click()
Dim intYN As Integer, oRS As Recordset, strSQL As String
If lblT2 <> "" Then
intYN = MsgBox("Do You Want To Change The Current Texture 2?", vbYesNo, "Change Texture")
If intYN = vbYes Then
txtBidPr2 = ""
strSQL = "SELECT * FROM tblTOLabor WHERE texture = '" & lblT2 & "' and toid = " & gintTOID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not oRS.EOF Then
oRS.Delete
End If
Else
Exit Sub
End If
End If
cboFinish.col = 1
lblT2 = cboFinish.ColText
mstrFINISH = lblT2
cboFinish.col = 2
lblFDesc2 = cboFinish.ColText
chkOpt(1) = vbChecked
cboFinish.ListIndex = -1
cboFinish.SearchText = ""
mintTexNum = 2
Call GetLabor
End Sub
Private Sub cmdSelectTex3_Click()
Dim intYN As Integer, oRS As Recordset, strSQL As String
If lblT3 <> "" Then
intYN = MsgBox("Do You Want To Change The Current Texture 3?", vbYesNo, "Change Texture")
If intYN = vbYes Then
txtBidPr3 = ""
strSQL = "SELECT * FROM tblTOLabor WHERE texture = " & lblT3 & " and toid = " & gintTOID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not oRS.EOF Then
oRS.Delete
End If
Else
Exit Sub
End If
End If
cboFinish.col = 1
lblT3 = cboFinish.ColText
mstrFINISH = lblT3
cboFinish.col = 2
lblFDesc3 = cboFinish.ColText
chkOpt(2) = vbChecked
cboFinish.ListIndex = -1
cboFinish.SearchText = ""
mintTexNum = 3
Call GetLabor
End Sub
Private Sub cmdSelectTex4_Click()
Dim intYN As Integer, oRS As Recordset, strSQL As String
If lblT4 <> "" Then
intYN = MsgBox("Do You Want To Change The Current Texture 4?", vbYesNo, "Change Texture")
If intYN = vbYes Then
txtBidPr4 = ""
strSQL = "SELECT * FROM tblTOLabor WHERE texture = " & lblT4 & " and toid = " & gintTOID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not oRS.EOF Then
oRS.Delete
End If
Else
Exit Sub
End If
End If
cboFinish.col = 1
lblT4 = cboFinish.ColText
mstrFINISH = lblT4
cboFinish.col = 2
lblFDesc4 = cboFinish.ColText
chkOpt(3) = vbChecked
cboFinish.ListIndex = -1
cboFinish.SearchText = ""
mintTexNum = 4
Call GetLabor
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 = " & Field2Integer(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 = " & Field2Integer(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(0) Then
mstrFINISH = Field2Str(lblT1)
ElseIf optPTex(1) Then
mstrFINISH = Field2Str(lblT2)
ElseIf optPTex(2) Then
mstrFINISH = Field2Str(lblT3)
ElseIf optPTex(3) Then
mstrFINISH = Field2Str(lblT4)
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
Dim strSQL As String, strTYPE As String
On Error GoTo Error_EH
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 = " & lstMInventory.ItemData(lstMInventory.ListIndex)
ElseIf optInv(1) Then
' strSQL = "SELECT * from tblInvTake WHERE Inv_no = " & txtMatInvNo.Text & " and estimator = '" & gstrLOGIN & "'"
strSQL = "SELECT * from tblInvTake where Inv_no = " & lstMInventory.ItemData(lstMInventory.ListIndex) & " 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 = Field2Integer(!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
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 = Field2Integer(!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 = Field2Integer(!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 = Field2Integer(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
mintTexNum = 0
If moRSProj!BagSand Then
lblSand = "Sand Bags:"
Else
lblSand = "Sand Tons:"
End If
End Sub
Private Sub SecondLoad()
Dim strSQL As String, strOpt As String, strMOD As String
Dim oRS As Recordset, intCNT As Integer, boolSKIP As Boolean
Dim strSEARCH As String, strDESC As String, strTEXTURE As String
Dim oRSF As Recordset, strSQLF As String, intPTex As Integer, strPTex As String
On Error GoTo Error_EH
boolSKIP = False
strPTex = Field2Str(moRS!finish)
strSQL = "SELECT toid, texture, bidprice, OptNum FROM tblTOLabor WHERE toid = " & gintTOID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenDynamic, adLockPessimistic
' intCnt = 1
Do Until oRS.EOF
intCNT = Field2Integer(oRS!OptNum)
strSEARCH = oRS!texture
strSQLF = "SELECT id, desc FROM tblFINISH WHERE id = '" & strSEARCH & "'"
Set oRSF = New Recordset
oRSF.Open strSQLF, goConn, adOpenForwardOnly, adLockReadOnly
If oRSF.EOF Then
MsgBox "Texture Was Not Found", vbOKOnly
oRSF.Close
Exit Sub
Else
strTEXTURE = Field2Str(oRSF!id)
strDESC = Field2Str(oRSF!Desc)
oRSF.Close
End If
If intCNT = 1 Then
chkOpt(0) = vbChecked
lblT1 = strTEXTURE
lblFDesc1 = strDESC
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
If strPTex = strTEXTURE Then
optPTex(0) = True
End If
End If
If intCNT = 2 Then
chkOpt(1) = vbChecked
lblT2 = strTEXTURE
lblFDesc2 = strDESC
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
If strPTex = strTEXTURE Then
optPTex(1) = True
End If
End If
If intCNT = 3 Then
chkOpt(2) = vbChecked
lblT3 = strTEXTURE
lblFDesc3 = strDESC
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
If strPTex = strTEXTURE Then
optPTex(2) = True
End If
End If
If intCNT = 4 Then
chkOpt(3) = vbChecked
lblT4 = strTEXTURE
lblFDesc4 = strDESC
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
If strPTex = strTEXTURE Then
optPTex(3) = True
End If
End If
' intCnt = intCnt + 1
oRS.MoveNext
Loop
Exit Sub
Error_EH:
gstrMODULE = "Form Take - Module SecondLoad"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub ProjLoad()
Dim strSQL As String
mboolBAG100 = False
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)
If moRSProj!BagSand Then
mboolBAG100 = True
ElseIf moRSProj!bag100 Then
mboolBAG100 = True
Else
mboolBAG100 = False
End If
If moRSProj!P_SW Then
mboolPSW = True
Else
mboolPSW = False
End If
' mboolBAG100 = Field2CheckBox(moRSProj!bag100)
' mboolSilica = Field2CheckBox(moRSProj!Silica)
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, ID, Desc FROM tblFinish"
Set oRSFinish = New Recordset
oRSFinish.Open strSQL, goConn, _
adOpenForwardOnly, adLockReadOnly
oRSFinish.MoveLast
oRSFinish.MoveFirst
intRows = oRSFinish.RecordCount
Do Until oRSFinish.EOF
cboFinish.AddItem oRSFinish!autoid & vbTab & oRSFinish!id & vbTab & Trim(oRSFinish!Desc)
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()
chkOpt(0) = vbUnchecked
txtBidPr1 = ""
lblT1 = ""
lblFDesc1 = ""
chkOpt(1) = vbUnchecked
txtBidPr2 = ""
lblT2 = ""
lblFDesc2 = ""
chkOpt(2) = vbUnchecked
txtBidPr3 = ""
lblT3 = ""
lblFDesc3 = ""
chkOpt(3) = vbUnchecked
txtBidPr4 = ""
lblT4 = ""
lblFDesc4 = ""
End Sub
Private Sub FormShow()
Dim dblOPENINGS As Double, strSELECT As String
Dim dblSplitCost As Double
Dim oRSF As Recordset, strSQL As String, strFIN2 As String
Dim oRSL As Recordset, tst As String
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)
chkP_RL = Field2CheckBox(!P_RL)
chkOpen = Field2CheckBox(!openflg)
txtTTLYds = Field2Str2(!TTL_Yds)
txtOpenings = Format(Field2Str2(!opening), "#,#")
txtPrcntge = Field2Integer(!openpr)
If Field2Integer(!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)
txtSLabAdj = Field2Integer(!s_adj)
txtWireAdj = Field2Integer(!w_adj)
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), "##,###")
txtTape = Format(Field2Str2(!TPE), "###,###")
If Field2Str2(txtLathYds) <> 0 Then
txtStuccoYds = Format((Field2Str2(txtLathYds) - 5), "##,###")
Else
txtStuccoYds = ""
End If
strFIN2 = Field2Str(!finish)
strSQL = "SELECT ID, DESC FROM tblFINISH WHERE ID = '" & strFIN2 & "'"
Set oRSF = New Recordset
oRSF.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
If Not oRSF.EOF Then
txtFinish = Field2Str(oRSF!Desc)
lblTexCode = !finish
lblT1 = !finish
lblFDesc1.Caption = txtFinish
optPTex(0).Value = True
Else
MsgBox "Finish For This Plan Not Found", vbOKOnly
End If
oRSF.Close
' On Error Resume Next
If !stype = "S" Then
cboOneKote = "Superwall"
ElseIf !stype = "M" Then
cboOneKote = "Pre-Mix Stucco"
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"
' ElseIf !stype = "P" Then
' cboOneKote = "Pre-Mix Stucco"
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
strSELECT = "SELECT * FROM tblTOLabor WHERE Texture = '" & mstrFINISH & "' and TOID = " & gintTOID
Set oRSL = New Recordset
oRSL.Open strSELECT, goConn, adOpenDynamic, adLockOptimistic
If oRSL.EOF Then
lblFixLbr.Visible = True
Else
lblFixLbr.Visible = False
' End If
With oRSL
' 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
End If
' 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 = Field2Integer(!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 = Field2Integer(!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, strNEWLAB 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
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
If Not moRSLAB.EOF Then
moRSLAB!toid = oRSMAX!MAXToid
moRSLAB.Update
End If
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"
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 = Field2Integer(oRS!toid)
gintTOID = Field2Long(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 = Field2Integer(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"
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"
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 = Field2Integer(!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
'Dim strFINISH As String
On Error GoTo Error_EH
' strFINISH = lstMod_Elv.ItemData(lstMod_Elv.ListIndex)
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 '********* there is a problem here because it tries to add another labor record compare to how it is in frmTAKE
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(strFINISH)
moRSLAB!texture = Field2Str(mstrFINISH)
moRSLAB!toid = lstMod_Elv.ItemData(lstMod_Elv.ListIndex)
' 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 FormClear
Call FormShow
Call MeasLoad
Call MatLoad
Call OptLoad
Call OptMatLoad
cmdDeleteTakeoff.Enabled = False
cmdNew.Enabled = True
If moRS!P_RL Then
gboolPSpecialCALC = True
End If
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, strLABOR 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)
!w_adj = Integer2Field(txtWireAdj)
!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)
!P_RL = chkP_RL
!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 = "Pre-Mix Stucco" 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"
' ElseIf cboOneKote.Text = "Pre-Mix Stucco" Then
' !stype = "P"
End If
If optPTex(0) Then
!finish = Field2Str(lblT1)
mstrFINISH = Field2Str(lblT1)
' mstrFINISH = lblFDesc1
ElseIf optPTex(1) Then
!finish = Field2Str(lblT2)
mstrFINISH = Field2Str(lblT2)
' mstrFINISH = lblFDesc2
ElseIf optPTex(2) Then
!finish = Field2Str(lblT3)
mstrFINISH = Field2Str(lblT3)
' mstrFINISH = lblFDesc3
ElseIf optPTex(3) Then
!finish = Field2Str(lblT4)
mstrFINISH = Field2Str(lblT4)
' mstrFINISH = lblFDesc4
End If
If mboolAdding Or mboolCopy Then
moRSLAB!texture = !finish
End If
End With
strLABOR = "SELECT * FROM tblTOLabor WHERE TEXTURE = '" & mstrFINISH & "' AND toid = " & gintTOID
Set moRSLAB = New Recordset
moRSLAB.Open strLABOR, goConn, adOpenKeyset, adLockOptimistic
If moRSLAB.EOF Then
MsgBox "Labor Rates Not Changed", vbOKOnly
Else
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
.Update
End With
End If
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
Call Measure_Setup
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
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"
txtBidPr1 = "0"
txtBidPr2 = "0"
txtBidPr3 = "0"
txtBidPr4 = "0"
txtNote = ""
cboOneKote.ListIndex = -1
txt68 = ""
txt108 = ""
txtO68 = ""
txtO108 = ""
chk2Story = vbUnchecked
chkOpt(0) = vbUnchecked
chkOpt(1) = vbUnchecked
chkOpt(2) = vbUnchecked
chkOpt(3) = vbUnchecked
lblFDesc1 = ""
lblFDesc2 = ""
lblFDesc3 = ""
lblFDesc4 = ""
lblT1 = ""
lblT2 = ""
lblT3 = ""
lblT4 = ""
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 ("Pre-Mix Stucco")
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
' cboOneKote.AddItem ("Pre-Mix Stucco")
' cboOneKote.ItemData(cboOneKote.NewIndex) = 7
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 = Integer2Field(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 = Integer2Field(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 TEXTURE = '" & mstrFINISH & "' AND 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!OptNum = mintTexNum
moRSLAB.Update
' Call GetLabor
End If
' strLABOR = "texture = '" & mstrFINISH & "'"
' moRSLAB.Filter = strLABOR
strSQL = "SELECT * from tblPrgInfo WHERE Texture = '" & mstrFINISH & "'"
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
If Not oRS.EOF Then
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")
' moRSLAB.Update
Else
MsgBox "No Labor Available For This Texture - Add The Figures", vbOKOnly
End If
' moRSLAB.Update
Call FormSave
oRS.Close
Exit Sub
Error_EH:
gstrMODULE = "Form Take - Module GetLabor"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub Option1_Click()
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 '& " AND OptNum = " & Index + 1
Set moRSLAB = New Recordset
moRSLAB.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
' Select Case Index
If optPTex(0) Then ' Case 0
mstrFINISH = Field2Str(lblT1)
txtFinish.Text = Field2Str(lblFDesc1)
lblTexCode = mstrFINISH
moRS!finish = mstrFINISH
moRS.Update
mintTexNum = Index + 1
End If
' optPTex(0).Value = True
If optPTex(1) Then ' Case 1
mstrFINISH = Field2Str(lblT2)
txtFinish.Text = Field2Str(lblFDesc2)
lblTexCode = mstrFINISH
moRS!finish = mstrFINISH
moRS.Update
mintTexNum = Index + 1
End If
' optPTex(1).Value = True
If optPTex(2) Then ' Case 2
mstrFINISH = Field2Str(lblT3)
txtFinish.Text = Field2Str(lblFDesc3)
lblTexCode = mstrFINISH
moRS!finish = mstrFINISH
moRS.Update
mintTexNum = Index + 1
End If
' optPTex(2).Value = True
If optPTex(3) Then ' Case 3
mstrFINISH = Field2Str(lblT4)
txtFinish.Text = Field2Str(lblFDesc4)
lblTexCode = mstrFINISH
moRS!finish = mstrFINISH
moRS.Update
mintTexNum = Index + 1
End If
' optPTex(3).Value = True
' End Select
'' Select Case Index
'' Case 0
'' mstrFINISH = Field2Str(lblT1)
'' txtFinish.Text = Field2Str(lblFDesc1)
'' lblTexCode = mstrFINISH
'' moRS!finish = mstrFINISH
'' mintTexNum = Index + 1
' optPTex(0).Value = True
'' Case 1
'' mstrFINISH = Field2Str(lblT2)
'' txtFinish.Text = Field2Str(lblFDesc2)
'' lblTexCode = mstrFINISH
'' moRS!finish = mstrFINISH
'' mintTexNum = Index + 1
' optPTex(1).Value = True
'' Case 2
'' mstrFINISH = Field2Str(lblT3)
'' txtFinish.Text = Field2Str(lblFDesc3)
'' lblTexCode = mstrFINISH
'' moRS!finish = mstrFINISH
'' mintTexNum = Index + 1
' optPTex(2).Value = True
'' Case 3
'' mstrFINISH = Field2Str(lblT4)
'' txtFinish.Text = Field2Str(lblFDesc4)
'' lblTexCode = mstrFINISH
'' moRS!finish = mstrFINISH
'' mintTexNum = Index + 1
' optPTex(3).Value = True
'' End Select
strLABOR = "SELECT * FROM tblTOLabor WHERE texture = '" & mstrFINISH & "' and 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 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 Long
Dim strSQL As String
'dim
If mboolSETUP Then
Call MatSave
lngFind = Field2Long(txtMatInvNo)
If lstMInventory.ListCount > lstMInventory.ListIndex Then
Call ListFindItem2(lstMInventory, lngFind)
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
Dim strFINISH As String
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 = vbKeyF And gbytSECURITY < 3 Then ' Display key combinations.
If CtrlDown And tabTake.Tab = 3 Then
strFINISH = InputBox("Enter The Finish Code (ie SK,MN etc)", "Enter Finish")
moRS!finish = UCase(strFINISH)
moRS.Update
End If
Exit Sub
End If
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(0) Then
mstrFINISH = Field2Str(lblT1)
ElseIf optPTex(1) Then
mstrFINISH = Field2Str(lblT2)
ElseIf optPTex(2) Then
mstrFINISH = Field2Str(lblT3)
ElseIf optPTex(3) Then
mstrFINISH = Field2Str(lblT4)
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
Private Sub SecondLoad9()
Dim strSQL As String, strOpt As String, strMOD As String
Dim oRS As Recordset, intCNT As Integer, boolSKIP As Boolean
Dim strSEARCH As String, strDESC As String, strTEXTURE As String
Dim oRSF As Recordset, strSQLF As String
On Error GoTo Error_EH
boolSKIP = False
strSQL = "SELECT toid, texture, bidprice, OptNum FROM tblTOLabor WHERE toid = " & gintTOID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenDynamic, adLockPessimistic
intCNT = 1
Do Until oRS.EOF
strSEARCH = oRS!texture
strSQLF = "SELECT id, desc FROM tblFINISH WHERE id = '" & strSEARCH & "'"
Set oRSF = New Recordset
oRSF.Open strSQLF, goConn, adOpenForwardOnly, adLockReadOnly
If oRSF.EOF Then
MsgBox "Texture Was Not Found", vbOKOnly
oRSF.Close
Exit Sub
Else
strTEXTURE = Field2Str(oRSF!id)
strDESC = Field2Str(oRSF!Desc)
oRSF.Close
End If
If intCNT = 1 Then
chkOpt(0) = vbChecked
lblT1 = strTEXTURE
lblFDesc1 = strDESC
End If
If intCNT = 2 Then
chkOpt(1) = vbChecked
lblT2 = strTEXTURE
lblFDesc2 = strDESC
End If
If intCNT = 3 Then
chkOpt(2) = vbChecked
lblT3 = strTEXTURE
lblFDesc3 = strDESC
End If
If intCNT = 4 Then
chkOpt(3) = vbChecked
lblT4 = strTEXTURE
lblFDesc4 = strDESC
End If
intCNT = intCNT + 1
oRS.MoveNext
Loop
Exit Sub
oRS.MoveFirst
Do Until oRS.EOF
If oRS!texture = "SK" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SKIP TROWEL:"
txtFinish = "SKIP TROWEL"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
' lblTexCode = "SK"
ElseIf oRS!OptNum = 2 Then 'NEED TO CHECK WHY TEXTURE CODE NOT CHANGING
chkOpt(1) = vbChecked
lblFDesc2 = "SKIP TROWEL: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SKIP TROWEL: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SKIP TROWEL: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSKIP = vbChecked
' txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "SA" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SAND-16: "
txtFinish = "SAND-16"
' lblTexCode = "SK"
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SAND-16: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SAND-16: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SAND-16: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSand = vbChecked
' txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "S2" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SAND-20: "
txtFinish = "SAND-20"
lblT1 = oRS!texture
' lblTexCode = "SK"
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SAND-20: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SAND-20: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SAND-20: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSand = vbChecked
' txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "S3" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SAND-30: "
txtFinish = "SAND-30"
lblT1 = oRS!texture
' lblTexCode = "SK"
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SAND-30: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SAND-30: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SAND-30: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSand = vbChecked
' txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
' ElseIf oRS!texture = "SB" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "EIFS-SAND BLAST: "
txtFinish = "EIFS-SAND BLAST"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "EIFS-SAND BLAST: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "EIFS-SAND BLAST: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "EIFS-SAND BLAST: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSB = vbChecked
' txtSBPr = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "DA" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "DASH: "
txtFinish = "DASH"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "DASH: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "DASH: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "DASH: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkDash = vbChecked
' txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "MN" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "MONTERREY: "
txtFinish = "MONTERREY"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "MONTERREY: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "MONTERREY: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "MONTERREY: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkMonterrey = vbChecked
'' txtMonterreyPr = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "SM" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SMOOTH: "
txtFinish = "SMOOTH"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SMOOTH: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SMOOTH: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SMOOTH: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSmooth = vbChecked
' txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "QU" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "QUERNAVACA: "
txtFinish = "QUERNAVACA"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "QUERNAVACA: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "QUERNAVACA: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "QUERNAVACA: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkQU = vbChecked
' txtQUPr = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "DF" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SKIP AND SAND FINISH: "
txtFinish = "SKIP AND SAND FINISH"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SKIP AND SAND FINISH: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SKIP AND SAND FINISH: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SKIP AND SAND FINISH: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkDF = vbChecked
' txtDFPr = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "MF" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "MONTERREY & SAND: "
txtFinish = "MONTERREY & SAND"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "MONTERREY & SAND: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "MONTERREY & SAND: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "MONTERREY & SAND: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkMF = vbChecked
' txtMFPr = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "SS" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SKIP && RIVER SAND FINISH: "
txtFinish = "SKIP && RIVER SAND FINISH"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SKIP && RIVER SAND FINISH: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SKIP && RIVER SAND FINISH: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SKIP && RIVER SAND FINISH: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
' chkSS = vbChecked
' txtSS = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!texture = "QS" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "QUERNAVACA & SAND 20: "
txtFinish = "QUERNAVACA & SAND 20"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "QUERNAVACA & SAND 20: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "QUERNAVACA & SAND 20: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "QUERNAVACA & SAND 20: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "CS" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "CORNERSTONE SKIP: "
txtFinish = "CORNERSTONE SKIP"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "CORNERSTONE SKIP: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "CORNERSTONE SKIP: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "CORNERSTONE SKIP: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "S4" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SAND - RIVER: "
txtFinish = "SAND - RIVER"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SAND - RIVER: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SAND - RIVER: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SAND - RIVER: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "M2" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "MONTERREY 20 SILICA: "
txtFinish = "MONTERREY 20 SILICA"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "MONTERREY 20 SILICA: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "MONTERREY 20 SILICA: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "MONTERREY 20 SILICA: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "M3" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "MONTERREY 30 SILICA: "
txtFinish = "MONTERREY 30 SILICA"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "MONTERREY 30 SILICA: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "MONTERREY 30 SILICA: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "MONTERREY 30 SILICA: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "RL" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "RANDOM LACE: "
txtFinish = "RANDOM LACE"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "RANDOM LACE: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "RANDOM LACE: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "RANDOM LACE: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "RF" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "RANDOM LACE & SAND: "
txtFinish = "RANDOM LACE & SAND"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "RANDOM LACE & SAND: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "RANDOM LACE & SAND: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "RANDOM LACE & SAND: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "MW" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "MORTAR WASH: "
txtFinish = "MORTAR WASH"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "MORTAR WASH: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "MORTAR WASH: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "MORTAR WASH: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "SC" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "SAND 16 W/ 20 PO: "
txtFinish = "SAND 16 W/ 20 PO"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "SAND 16 W/ 20 PO: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "SAND 16 W/ 20 PO: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "SAND 16 W/ 20 PO: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "RS" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "RYLAND SKIP: "
txtFinish = "RYLAND SKIP"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "RYLAND SKIP: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "RYLAND SKIP: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "RYLAND SKIP: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "RM" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "RYLAND MONTERREY: "
txtFinish = "RYLAND MONTERREY"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "RYLAND MONTERREY: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "RYLAND MONTERREY: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "RYLAND MONTERREY: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
ElseIf oRS!texture = "RD" Then
If oRS!OptNum = 1 Then
optPTex(0).Value = True
chkOpt(0) = vbChecked
lblFDesc1 = "RYLAND SAND: "
txtFinish = "RYLAND SAND"
lblT1 = oRS!texture
txtBidPr1 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 2 Then
chkOpt(1) = vbChecked
lblFDesc2 = "RYLAND SAND: "
lblT2 = oRS!texture
txtBidPr2 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 3 Then
chkOpt(2) = vbChecked
lblFDesc3 = "RYLAND SAND: "
lblT3 = oRS!texture
txtBidPr3 = Format(Field2Double(oRS!bidprice), "###,###")
ElseIf oRS!OptNum = 4 Then
chkOpt(3) = vbChecked
lblFDesc4 = "RYLAND SAND: "
lblT4 = oRS!texture
txtBidPr4 = Format(Field2Double(oRS!bidprice), "###,###")
End If
End If
oRS.MoveNext
Loop
Exit Sub
Error_EH:
gstrMODULE = "Form Take - Module SecondLoad9"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub