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>
This commit is contained in:
@@ -0,0 +1,941 @@
|
||||
VERSION 5.00
|
||||
Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx"
|
||||
Begin VB.Form frmInventory
|
||||
Caption = "Inventory Prices"
|
||||
ClientHeight = 3690
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8355
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 3690
|
||||
ScaleWidth = 8355
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin LpLib.fpList lstInventory
|
||||
Height = 3000
|
||||
Left = 15
|
||||
TabIndex = 26
|
||||
Top = 510
|
||||
Width = 3360
|
||||
_Version = 196608
|
||||
_ExtentX = 5927
|
||||
_ExtentY = 5292
|
||||
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Enabled = -1 'True
|
||||
MousePointer = 0
|
||||
Object.TabStop = 0 'False
|
||||
BackColor = -2147483643
|
||||
ForeColor = -2147483640
|
||||
Columns = 2
|
||||
Sorted = 0
|
||||
LineWidth = 1
|
||||
SelDrawFocusRect= -1 'True
|
||||
ColumnSeparatorChar= 9
|
||||
ColumnSearch = -1
|
||||
ColumnWidthScale= 2
|
||||
RowHeight = -1
|
||||
MultiSelect = 0
|
||||
WrapList = 0 'False
|
||||
WrapWidth = 0
|
||||
SelMax = -1
|
||||
AutoSearch = 1
|
||||
SearchMethod = 0
|
||||
VirtualMode = 0 'False
|
||||
VRowCount = 0
|
||||
DataSync = 3
|
||||
ThreeDInsideStyle= 1
|
||||
ThreeDInsideHighlightColor= -2147483633
|
||||
ThreeDInsideShadowColor= -2147483627
|
||||
ThreeDInsideWidth= 1
|
||||
ThreeDOutsideStyle= 1
|
||||
ThreeDOutsideHighlightColor= -2147483628
|
||||
ThreeDOutsideShadowColor= -2147483632
|
||||
ThreeDOutsideWidth= 1
|
||||
ThreeDFrameWidth= 0
|
||||
BorderStyle = 0
|
||||
BorderColor = -2147483642
|
||||
BorderWidth = 1
|
||||
ThreeDOnFocusInvert= 0 'False
|
||||
ThreeDFrameColor= -2147483633
|
||||
Appearance = 2
|
||||
BorderDropShadow= 0
|
||||
BorderDropShadowColor= -2147483632
|
||||
BorderDropShadowWidth= 3
|
||||
ScrollHScale = 2
|
||||
ScrollHInc = 0
|
||||
ColsFrozen = 0
|
||||
ScrollBarV = 1
|
||||
NoIntegralHeight= 0 'False
|
||||
HighestPrecedence= 0
|
||||
AllowColResize = 0
|
||||
AllowColDragDrop= 0
|
||||
ReadOnly = 0 'False
|
||||
VScrollSpecial = 0 'False
|
||||
VScrollSpecialType= 0
|
||||
EnableKeyEvents = -1 'True
|
||||
EnableTopChangeEvent= -1 'True
|
||||
DataAutoHeadings= -1 'True
|
||||
DataAutoSizeCols= 2
|
||||
SearchIgnoreCase= -1 'True
|
||||
ScrollBarH = 1
|
||||
VirtualPageSize = 0
|
||||
VirtualPagesAhead= 0
|
||||
ExtendCol = 0
|
||||
ColumnLevels = 1
|
||||
ListGrayAreaColor= -2147483637
|
||||
GroupHeaderHeight= -1
|
||||
GroupHeaderShow = 0 'False
|
||||
AllowGrpResize = 0
|
||||
AllowGrpDragDrop= 0
|
||||
MergeAdjustView = 0 'False
|
||||
ColumnHeaderShow= -1 'True
|
||||
ColumnHeaderHeight= 210
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmInventory.frx":0000
|
||||
End
|
||||
Begin LpLib.fpCombo cboMType
|
||||
Height = 315
|
||||
Left = 4680
|
||||
TabIndex = 25
|
||||
Top = 2235
|
||||
Width = 1215
|
||||
_Version = 196608
|
||||
_ExtentX = 2143
|
||||
_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 = -1 'True
|
||||
BackColor = -2147483643
|
||||
ForeColor = -2147483640
|
||||
Text = "cboMType"
|
||||
Columns = 2
|
||||
Sorted = 0
|
||||
SelDrawFocusRect= -1 'True
|
||||
ColumnSeparatorChar= 9
|
||||
ColumnSearch = -1
|
||||
ColumnWidthScale= 2
|
||||
RowHeight = -1
|
||||
WrapList = 0 'False
|
||||
WrapWidth = 0
|
||||
AutoSearch = 1
|
||||
SearchMethod = 0
|
||||
VirtualMode = 0 'False
|
||||
VRowCount = 0
|
||||
DataSync = 3
|
||||
ThreeDInsideStyle= 1
|
||||
ThreeDInsideHighlightColor= -2147483633
|
||||
ThreeDInsideShadowColor= -2147483627
|
||||
ThreeDInsideWidth= 1
|
||||
ThreeDOutsideStyle= 1
|
||||
ThreeDOutsideHighlightColor= -2147483628
|
||||
ThreeDOutsideShadowColor= -2147483632
|
||||
ThreeDOutsideWidth= 1
|
||||
ThreeDFrameWidth= 0
|
||||
BorderStyle = 0
|
||||
BorderColor = -2147483642
|
||||
BorderWidth = 1
|
||||
ThreeDOnFocusInvert= 0 'False
|
||||
ThreeDFrameColor= -2147483633
|
||||
Appearance = 2
|
||||
BorderDropShadow= 0
|
||||
BorderDropShadowColor= -2147483632
|
||||
BorderDropShadowWidth= 3
|
||||
ScrollHScale = 2
|
||||
ScrollHInc = 0
|
||||
ColsFrozen = 0
|
||||
ScrollBarV = 1
|
||||
NoIntegralHeight= 0 'False
|
||||
HighestPrecedence= 0
|
||||
AllowColResize = 0
|
||||
AllowColDragDrop= 0
|
||||
ReadOnly = 0 'False
|
||||
VScrollSpecial = 0 'False
|
||||
VScrollSpecialType= 0
|
||||
EnableKeyEvents = -1 'True
|
||||
EnableTopChangeEvent= -1 'True
|
||||
DataAutoHeadings= -1 'True
|
||||
DataAutoSizeCols= 2
|
||||
SearchIgnoreCase= -1 'True
|
||||
ScrollBarH = 1
|
||||
DataFieldList = ""
|
||||
ColumnEdit = -1
|
||||
ColumnBound = -1
|
||||
Style = 0
|
||||
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 = "frmInventory.frx":02B4
|
||||
End
|
||||
Begin VB.CommandButton cmdCopy
|
||||
Caption = "Copy Inventory"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 555
|
||||
Left = 5880
|
||||
TabIndex = 24
|
||||
Top = 3000
|
||||
Visible = 0 'False
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.ComboBox cboInvType
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":05B2
|
||||
Left = 4680
|
||||
List = "frmInventory.frx":05C5
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 23
|
||||
Top = 60
|
||||
Width = 3555
|
||||
End
|
||||
Begin VB.CommandButton cmdUpdate
|
||||
Caption = "Update TO Cost"
|
||||
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 = 555
|
||||
Left = 5880
|
||||
TabIndex = 21
|
||||
Top = 1200
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.TextBox txtLength
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 4680
|
||||
TabIndex = 11
|
||||
Top = 2940
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.ComboBox cboMetal
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":0608
|
||||
Left = 4680
|
||||
List = "frmInventory.frx":0612
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 10
|
||||
Top = 2580
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.ComboBox cboMType2
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":0623
|
||||
Left = 5970
|
||||
List = "frmInventory.frx":0625
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 9
|
||||
Top = 2460
|
||||
Visible = 0 'False
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.ComboBox cboDFlag
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":0627
|
||||
Left = 4680
|
||||
List = "frmInventory.frx":0631
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 8
|
||||
Top = 1860
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.TextBox txtTOCost
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 4680
|
||||
TabIndex = 7
|
||||
Top = 1500
|
||||
Width = 855
|
||||
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 = 555
|
||||
Left = 7080
|
||||
TabIndex = 15
|
||||
TabStop = 0 'False
|
||||
Top = 3000
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.CommandButton cmdDeleteInv
|
||||
Caption = "&Delete Inventory"
|
||||
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 = 555
|
||||
Left = 7080
|
||||
TabIndex = 14
|
||||
TabStop = 0 'False
|
||||
Top = 2400
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.CommandButton cmdSaveInv
|
||||
Caption = "&Save Inventory"
|
||||
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 = 555
|
||||
Left = 7080
|
||||
TabIndex = 12
|
||||
Top = 1800
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.CommandButton cmdAddInv
|
||||
Caption = "&Add Inventory"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 555
|
||||
Left = 7080
|
||||
TabIndex = 13
|
||||
TabStop = 0 'False
|
||||
Top = 1200
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.TextBox txtPrice
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 4680
|
||||
MaxLength = 8
|
||||
TabIndex = 6
|
||||
Top = 1125
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.TextBox txtDesc
|
||||
Height = 315
|
||||
Left = 4680
|
||||
MaxLength = 30
|
||||
TabIndex = 5
|
||||
Top = 780
|
||||
Width = 3555
|
||||
End
|
||||
Begin VB.TextBox txtInvNo
|
||||
Height = 315
|
||||
Left = 4680
|
||||
MaxLength = 15
|
||||
TabIndex = 4
|
||||
Top = 420
|
||||
Width = 2625
|
||||
End
|
||||
Begin VB.Label lblInvType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Inventory Type:"
|
||||
Height = 195
|
||||
Left = 3465
|
||||
TabIndex = 22
|
||||
Top = 120
|
||||
Width = 1110
|
||||
End
|
||||
Begin VB.Label lblLength
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Metal Length:"
|
||||
Height = 195
|
||||
Left = 3600
|
||||
TabIndex = 20
|
||||
Top = 3000
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.Label lblMetal
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Metal Flag:"
|
||||
Height = 195
|
||||
Left = 3795
|
||||
TabIndex = 19
|
||||
Top = 2640
|
||||
Width = 780
|
||||
End
|
||||
Begin VB.Label lblMType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Material Type:"
|
||||
Height = 195
|
||||
Left = 3570
|
||||
TabIndex = 18
|
||||
Top = 2280
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblDFlag
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Delivery Flag:"
|
||||
Height = 195
|
||||
Left = 3615
|
||||
TabIndex = 17
|
||||
Top = 1920
|
||||
Width = 960
|
||||
End
|
||||
Begin VB.Label lblTOCost
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Takeoff Cost:"
|
||||
Height = 195
|
||||
Left = 3615
|
||||
TabIndex = 16
|
||||
Top = 1560
|
||||
Width = 960
|
||||
End
|
||||
Begin VB.Label lblPrice
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Yard Cost:"
|
||||
Height = 195
|
||||
Left = 3840
|
||||
TabIndex = 3
|
||||
Top = 1200
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.Label lblDesc
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Description:"
|
||||
Height = 195
|
||||
Left = 3735
|
||||
TabIndex = 2
|
||||
Top = 840
|
||||
Width = 840
|
||||
End
|
||||
Begin VB.Label lblInvNo
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Inventory #:"
|
||||
Height = 195
|
||||
Left = 3720
|
||||
TabIndex = 1
|
||||
Top = 480
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.Label lblInventory
|
||||
Caption = "Inventory Items"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 255
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 1815
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmInventory"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSMat As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean
|
||||
Dim mboolAdding As Boolean, mintBOOKMARK As Integer
|
||||
Dim moRSYS As Recordset
|
||||
|
||||
Private Sub LoadInventory()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
Dim strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT Inv_no, Desc from tblInvtry WHERE Inv_Type = " & cboInvType.ListIndex
|
||||
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 = 0
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Inventory - Module LoadInventory"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvNo = ""
|
||||
txtDesc = ""
|
||||
txtPrice = ""
|
||||
txtTOCost = ""
|
||||
txtLength = ""
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String, strINVNO As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
lstInventory.col = 0
|
||||
strINVNO = lstInventory.ColText
|
||||
strSQL = "SELECT * FROM tblInvtry WHERE INV_NO = '" & strINVNO & "' AND INV_TYPE = " & cboInvType.ListIndex
|
||||
|
||||
Set moRSMat = New Recordset
|
||||
moRSMat.Open strSQL, goConn, _
|
||||
adOpenKeyset, adLockOptimistic
|
||||
|
||||
If moRSMat.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Inventory - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If mboolAdding Then
|
||||
moRSMat.AddNew
|
||||
End If
|
||||
' Store the controls to the recordset
|
||||
Call FieldsSave
|
||||
|
||||
moRSMat.Update
|
||||
|
||||
If mboolAdding Then
|
||||
mboolAdding = False
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler(moRSMat.ActiveConnection)
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
Private Sub FormShow()
|
||||
Dim strTYPE As String, strINDEX As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSMat
|
||||
txtInvNo = Field2Str(!inv_no)
|
||||
txtDesc = Field2Str(!Desc)
|
||||
txtPrice = Format$(Field2Str(!price), "##,###.00")
|
||||
txtTOCost = Format$(Field2Str(!tprice), "##,###.00")
|
||||
txtLength = Field2Str2(!calc_amt)
|
||||
|
||||
If !d_flag = "S" Then
|
||||
cboDFlag.Text = "Supplier"
|
||||
Else
|
||||
cboDFlag.Text = "Yard"
|
||||
End If
|
||||
strTYPE = Field2Str(!m_type)
|
||||
|
||||
' If cboMType = "" Then
|
||||
|
||||
If strTYPE = "L" Then
|
||||
' cboMType.Index = 1
|
||||
cboMType.Text = "Lath"
|
||||
' cboMType.
|
||||
' ctlAny.List = "Lath"
|
||||
' ctlAny.ListIndex = 0
|
||||
ElseIf strTYPE = "B" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "Brown"
|
||||
ElseIf strTYPE = "S" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "Scratch"
|
||||
ElseIf strTYPE = "T" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "Texture"
|
||||
ElseIf strTYPE = "C" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "CMU"
|
||||
ElseIf strTYPE = "P" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "PreOrder"
|
||||
ElseIf strTYPE = "V" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "Veneer-Stone"
|
||||
ElseIf strTYPE = "W" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "Wrap Typar"
|
||||
ElseIf strTYPE = "Z" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "Z-PreCast"
|
||||
ElseIf strTYPE = "E" Then
|
||||
' ctlAny.ListIndex = 1
|
||||
cboMType.Text = "E-Synthetic"
|
||||
ElseIf strTYPE = "J" Then
|
||||
cboMType.Text = "J-PaintPrep"
|
||||
ElseIf strTYPE = "K" Then
|
||||
cboMType.Text = "K-P-Interior"
|
||||
ElseIf strTYPE = "N" Then
|
||||
cboMType.Text = "N-P-Exterior"
|
||||
ElseIf strTYPE = "M" Then
|
||||
cboMType.Text = "M-PaintFinal"
|
||||
Else
|
||||
cboMType.ListIndex = -1
|
||||
End If
|
||||
|
||||
' Else
|
||||
' Call FindType3(strINDEX, strTYPE)
|
||||
' cboMType.ListIndex = CLng(strINDEX)
|
||||
' Call FindType(cboMType, strTYPE)
|
||||
' End If
|
||||
|
||||
If !calc_flag = "M" Then
|
||||
cboMetal.Text = "Metal"
|
||||
Else
|
||||
cboMetal.Text = "None"
|
||||
End If
|
||||
End With
|
||||
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Inventory - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
Private Sub FieldsSave()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSMat
|
||||
!inv_no = Str2Field(UCase(txtInvNo))
|
||||
!Desc = Str2Field(txtDesc)
|
||||
!price = Str2Field(txtPrice)
|
||||
!tprice = Str2Field(txtTOCost)
|
||||
!l_u_date = Now()
|
||||
!LUUser = gstrLOGIN
|
||||
!calc_amt = Str2Field(txtLength)
|
||||
!m_type = Left$(cboMType.Text, 1)
|
||||
!inv_type = cboInvType.ListIndex
|
||||
|
||||
If cboDFlag.Text = "Supplier" Then
|
||||
!d_flag = "S"
|
||||
ElseIf cboDFlag.Text = "Yard" Then
|
||||
!d_flag = "Y"
|
||||
End If
|
||||
|
||||
If cboMetal.Text = "Metal" Then
|
||||
!calc_flag = "M"
|
||||
Else
|
||||
!calc_flag = ""
|
||||
!calc_amt = 0
|
||||
End If
|
||||
End With
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Inventory - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cboInvType_Change()
|
||||
Call LoadInventory
|
||||
End Sub
|
||||
|
||||
Private Sub cboInvType_Click()
|
||||
Call LoadInventory
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAddInv_Click()
|
||||
cmdAddInv.Enabled = False
|
||||
cmdSaveInv.Enabled = True
|
||||
cmdDeleteInv.Enabled = False
|
||||
mboolAdding = True
|
||||
Call FormClear
|
||||
txtInvNo.SetFocus
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDeleteInv_Click()
|
||||
cmdDeleteInv.Enabled = False
|
||||
cmdSaveInv.Enabled = False
|
||||
cmdAddInv.Enabled = True
|
||||
moRSMat.Delete
|
||||
Call LoadInventory
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSaveInv_Click()
|
||||
mintBOOKMARK = lstInventory.ListIndex
|
||||
cmdSaveInv.Enabled = False
|
||||
cmdDeleteInv.Enabled = False
|
||||
cmdAddInv.Enabled = True
|
||||
Call FormSave
|
||||
Call LoadInventory
|
||||
lstInventory.ListIndex = mintBOOKMARK
|
||||
lstInventory.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub cmdUpdate_Click()
|
||||
txtTOCost = Round((Field2Str2(txtPrice) * Field2Str2(moRSYS!TOMMU)), 2)
|
||||
Call cmdSaveInv_Click
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
|
||||
|
||||
Call MTypeLoad(cboMType)
|
||||
Call LoadInventory
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
' If Not cmdSaveInv.Enabled Then
|
||||
' cmdSaveInv.Enabled = True
|
||||
' cmdAddInv.Enabled = False
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub Form_Load()
|
||||
Dim strSQL As String
|
||||
|
||||
Set moRSMat = New Recordset
|
||||
Set moRSYS = New Recordset
|
||||
cboInvType.ListIndex = 0
|
||||
strSQL = "SELECT * FROM tblSYSInfo"
|
||||
moRSYS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
' Call MTypeLoad(cboMType)
|
||||
' Call LoadInventory
|
||||
|
||||
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 cmdSaveInv.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
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
If moRSMat.State = adStateOpen Then
|
||||
moRSMat.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = 3219 Then
|
||||
Resume Next
|
||||
Else
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lstInventory_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If lstInventory.ListIndex <> -1 Then
|
||||
If FormFind() Then
|
||||
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Inventory - Module lstInventory_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstInventory_DblClick()
|
||||
cmdSaveInv.Enabled = True
|
||||
cmdDeleteInv.Enabled = True
|
||||
cmdAddInv.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub txtDesc_GotFocus()
|
||||
Call FieldSelect(txtDesc)
|
||||
End Sub
|
||||
|
||||
Private Sub txtDesc_LostFocus()
|
||||
txtDesc = UCase(txtDesc)
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvNo_GotFocus()
|
||||
Call FieldSelect(txtInvNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvNo_LostFocus()
|
||||
txtInvNo = UCase(txtInvNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtLength_GotFocus()
|
||||
Call FieldSelect(txtLength)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPrice_GotFocus()
|
||||
Call FieldSelect(txtPrice)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPrice_LostFocus()
|
||||
If Field2Str2(txtTOCost) = 0 Then
|
||||
txtTOCost = Round((Field2Str2(txtPrice) * Field2Str2(moRSYS!TOMMU)), 2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtTOCost_GotFocus()
|
||||
Call FieldSelect(txtTOCost)
|
||||
End Sub
|
||||
Reference in New Issue
Block a user