677 lines
20 KiB
Plaintext
677 lines
20 KiB
Plaintext
VERSION 5.00
|
|
Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx"
|
|
Begin VB.Form frmWOList
|
|
Caption = "PO/WO List"
|
|
ClientHeight = 4350
|
|
ClientLeft = 60
|
|
ClientTop = 345
|
|
ClientWidth = 7230
|
|
KeyPreview = -1 'True
|
|
LinkTopic = "Form1"
|
|
ScaleHeight = 4350
|
|
ScaleWidth = 7230
|
|
StartUpPosition = 3 'Windows Default
|
|
Begin LpLib.fpList lstRepairs
|
|
Height = 1320
|
|
Left = 30
|
|
TabIndex = 5
|
|
Top = 1875
|
|
Width = 7140
|
|
_Version = 196608
|
|
_ExtentX = 12594
|
|
_ExtentY = 2328
|
|
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 400
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Enabled = -1 'True
|
|
MousePointer = 0
|
|
Object.TabStop = 0 'False
|
|
BackColor = -2147483643
|
|
ForeColor = -2147483640
|
|
Columns = 5
|
|
Sorted = 0
|
|
LineWidth = 1
|
|
SelDrawFocusRect= -1 'True
|
|
ColumnSeparatorChar= 9
|
|
ColumnSearch = -1
|
|
ColumnWidthScale= 2
|
|
RowHeight = -1
|
|
MultiSelect = 0
|
|
WrapList = 0 'False
|
|
WrapWidth = 0
|
|
SelMax = -1
|
|
AutoSearch = 1
|
|
SearchMethod = 0
|
|
VirtualMode = 0 'False
|
|
VRowCount = 0
|
|
DataSync = 3
|
|
ThreeDInsideStyle= 1
|
|
ThreeDInsideHighlightColor= -2147483633
|
|
ThreeDInsideShadowColor= -2147483627
|
|
ThreeDInsideWidth= 1
|
|
ThreeDOutsideStyle= 1
|
|
ThreeDOutsideHighlightColor= -2147483628
|
|
ThreeDOutsideShadowColor= -2147483632
|
|
ThreeDOutsideWidth= 1
|
|
ThreeDFrameWidth= 0
|
|
BorderStyle = 0
|
|
BorderColor = -2147483642
|
|
BorderWidth = 1
|
|
ThreeDOnFocusInvert= 0 'False
|
|
ThreeDFrameColor= -2147483633
|
|
Appearance = 2
|
|
BorderDropShadow= 0
|
|
BorderDropShadowColor= -2147483632
|
|
BorderDropShadowWidth= 3
|
|
ScrollHScale = 2
|
|
ScrollHInc = 0
|
|
ColsFrozen = 0
|
|
ScrollBarV = 1
|
|
NoIntegralHeight= 0 'False
|
|
HighestPrecedence= 0
|
|
AllowColResize = 0
|
|
AllowColDragDrop= 0
|
|
ReadOnly = 0 'False
|
|
VScrollSpecial = 0 'False
|
|
VScrollSpecialType= 0
|
|
EnableKeyEvents = -1 'True
|
|
EnableTopChangeEvent= -1 'True
|
|
DataAutoHeadings= -1 'True
|
|
DataAutoSizeCols= 2
|
|
SearchIgnoreCase= -1 'True
|
|
ScrollBarH = 1
|
|
VirtualPageSize = 0
|
|
VirtualPagesAhead= 0
|
|
ExtendCol = 0
|
|
ColumnLevels = 1
|
|
ListGrayAreaColor= -2147483637
|
|
GroupHeaderHeight= -1
|
|
GroupHeaderShow = 0 'False
|
|
AllowGrpResize = 0
|
|
AllowGrpDragDrop= 0
|
|
MergeAdjustView = 0 'False
|
|
ColumnHeaderShow= -1 'True
|
|
ColumnHeaderHeight= 285
|
|
GrpsFrozen = 0
|
|
BorderGrayAreaColor= -2147483637
|
|
ExtendRow = 0
|
|
DataField = ""
|
|
OLEDragMode = 0
|
|
OLEDropMode = 0
|
|
EnableClickEvent= -1 'True
|
|
Redraw = -1 'True
|
|
ResizeRowToFont = 0 'False
|
|
TextTipMultiLine= 0
|
|
ColDesigner = "frmWOList.frx":0000
|
|
End
|
|
Begin VB.CheckBox chkQUIT
|
|
Caption = "QUIT"
|
|
Height = 240
|
|
Left = 4770
|
|
TabIndex = 4
|
|
Top = 4065
|
|
Visible = 0 'False
|
|
Width = 945
|
|
End
|
|
Begin VB.CommandButton cmdADD
|
|
Caption = "ADD"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 405
|
|
Left = 2085
|
|
TabIndex = 3
|
|
Top = 3915
|
|
Width = 900
|
|
End
|
|
Begin LpLib.fpList lstProj
|
|
Height = 1320
|
|
Left = 30
|
|
TabIndex = 1
|
|
Top = 300
|
|
Width = 7125
|
|
_Version = 196608
|
|
_ExtentX = 12568
|
|
_ExtentY = 2328
|
|
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 = 4
|
|
Sorted = 1
|
|
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= 285
|
|
GrpsFrozen = 0
|
|
BorderGrayAreaColor= -2147483637
|
|
ExtendRow = 0
|
|
DataField = ""
|
|
OLEDragMode = 0
|
|
OLEDropMode = 0
|
|
EnableClickEvent= -1 'True
|
|
Redraw = -1 'True
|
|
ResizeRowToFont = 0 'False
|
|
TextTipMultiLine= 0
|
|
ColDesigner = "frmWOList.frx":03FD
|
|
End
|
|
Begin VB.CommandButton cmdExit
|
|
Caption = "&Exit"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 405
|
|
Left = 1050
|
|
TabIndex = 0
|
|
TabStop = 0 'False
|
|
Top = 3915
|
|
Width = 900
|
|
End
|
|
Begin VB.Label lblRepairs
|
|
AutoSize = -1 'True
|
|
Caption = "Repair List"
|
|
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 = 30
|
|
TabIndex = 7
|
|
Top = 1665
|
|
Width = 930
|
|
End
|
|
Begin VB.Label lblPOWO
|
|
AutoSize = -1 'True
|
|
Caption = "PO/WO Invoice List"
|
|
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 = 75
|
|
TabIndex = 6
|
|
Top = 30
|
|
Width = 1725
|
|
End
|
|
Begin VB.Label lblInst
|
|
Caption = "High Light The PO/WO You Want And Then Double Click To Select It. Click the ADD button to Add a new PO/WO."
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 9.75
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
ForeColor = &H00FF0000&
|
|
Height = 555
|
|
Left = 15
|
|
TabIndex = 2
|
|
Top = 3315
|
|
Width = 6225
|
|
End
|
|
End
|
|
Attribute VB_Name = "frmWOList"
|
|
Attribute VB_GlobalNameSpace = False
|
|
Attribute VB_Creatable = False
|
|
Attribute VB_PredeclaredId = True
|
|
Attribute VB_Exposed = False
|
|
Option Explicit
|
|
Dim moRSREP As Recordset
|
|
|
|
Dim mboolAdding As Boolean, mboolPROJ As Boolean
|
|
|
|
Private Sub cmdAdd_Click()
|
|
Load frmPOWOLot
|
|
frmPOWOLot.chkADD = vbChecked
|
|
frmPOWOLot.Show 1
|
|
Call ProjLoad
|
|
|
|
End Sub
|
|
|
|
Private Sub cmdExit_Click()
|
|
Unload Me
|
|
End Sub
|
|
|
|
Private Sub cmdSearch_Click()
|
|
Call ContainLoad
|
|
mboolPROJ = True
|
|
End Sub
|
|
|
|
Private Sub Form_Activate()
|
|
Dim intResponse As Integer, intYN As Integer, intYYN As Integer
|
|
Dim strSQL As String
|
|
|
|
On Error GoTo Error_EH
|
|
If chkQUIT = vbChecked Then
|
|
Unload Me
|
|
End If
|
|
|
|
If lstProj.ListCount = 0 Then
|
|
If lstRepairs.ListCount > 0 Then
|
|
intYYN = MsgBox("No PO/WO For This Lot But There Are Repairs. Do You Want Use A Repair?", vbYesNo, "Use Repair?")
|
|
If intYYN Then
|
|
Exit Sub
|
|
Else
|
|
intYN = MsgBox("No PO/WO For This Lot. Do You Want To Add One?", vbYesNo, "Add A PO/WO?")
|
|
If intYN = vbYes Then
|
|
Call cmdAdd_Click
|
|
Else
|
|
Unload Me
|
|
End If
|
|
End If
|
|
' intYN = MsgBox("No PO/WO For This Lot. Do You Want To Add One?", vbYesNo, "Add A PO/WO?")
|
|
' If intYN = vbYes Then
|
|
' Call cmdAdd_Click
|
|
' Else
|
|
' Unload Me
|
|
' End If
|
|
End If
|
|
End If
|
|
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
gstrMODULE = "formProjList - Module Form_Activate"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Sub
|
|
|
|
End Sub
|
|
|
|
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
|
Dim ShiftDown, AltDown, CtrlDown
|
|
|
|
If Shift = 4 Then
|
|
Exit Sub
|
|
End If
|
|
ShiftDown = (Shift And vbShiftMask) > 0
|
|
AltDown = (Shift And vbAltMask) > 0
|
|
CtrlDown = (Shift And vbCtrlMask) > 0
|
|
|
|
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()
|
|
|
|
On Error GoTo Error_EH
|
|
|
|
Call RepairLoad
|
|
Call ProjLoad
|
|
If lstProj.ListIndex <> -1 Then
|
|
|
|
mboolPROJ = False
|
|
End If
|
|
Exit Sub
|
|
|
|
|
|
Error_EH:
|
|
gstrMODULE = "formProjList - Module Form_Load"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Sub
|
|
End Sub
|
|
|
|
Private Sub ProjLoad()
|
|
Dim oRS As Recordset, intYN As Integer
|
|
Dim strSQL As String
|
|
Dim strLine As String
|
|
On Error GoTo Error_EH
|
|
|
|
strSQL = "SELECT * FROM tblPOWO WHERE LOT_ID = " & gintLOTID ' & "'"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
|
|
|
lstProj.Clear
|
|
|
|
Do Until oRS.EOF
|
|
With lstProj
|
|
strLine = Field2Str(oRS!repair_id) & vbTab & Field2Str(oRS!builder_PO) & vbTab & Field2Str(oRS!invoice_no) & vbTab & Field2Str(oRS!Desc)
|
|
.AddItem strLine
|
|
End With
|
|
|
|
oRS.MoveNext
|
|
Loop
|
|
|
|
If lstProj.ListCount Then
|
|
lstProj.ListIndex = 0
|
|
mboolPROJ = False
|
|
Else
|
|
lstProj.ListIndex = -1
|
|
' Call FormClear
|
|
End If
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
gstrMODULE = "FormProjList - Module ProjLoad"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Sub
|
|
End Sub
|
|
|
|
Private Function FormFindCrew() As Boolean
|
|
Dim strSQL As String
|
|
On Error GoTo Error_EH
|
|
|
|
strSQL = "SELECT * FROM tblorders WHERE order_Id = " & lstProj.ItemData(lstProj.ListIndex)
|
|
Set moRSREP = New Recordset
|
|
moRSREP.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
|
|
|
If moRSREP.EOF Then
|
|
FormFindCrew = False
|
|
Else
|
|
FormFindCrew = True
|
|
End If
|
|
Exit Function
|
|
|
|
Error_EH:
|
|
gstrMODULE = "formProjList - Module FormFindCrew"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Function
|
|
End Function
|
|
|
|
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
|
|
Dim intResponse As Integer, strMSG As String
|
|
On Error GoTo Error_EH
|
|
|
|
If moRSREP.State = adStateOpen Then
|
|
moRSREP.Close
|
|
End If
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
If Err = 3219 Then
|
|
Resume Next
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub lstProj_DblClick()
|
|
|
|
lstProj.col = 0
|
|
gintREPAIRID = Field2Str2(lstProj.ColText)
|
|
frmPOWOLot.Show 1
|
|
Unload Me
|
|
End Sub
|
|
|
|
Private Sub ContainLoad()
|
|
' Dim oRS As Recordset, oRSP As Recordset
|
|
' Dim strSQL As String, strSELECT As String, strContain As String
|
|
' Dim strSQLP As String, intYN As Integer, strADDRESS As String, strLine As String
|
|
' Dim strProj_Desc As String, strProj_Cont As String, strProj_Code As String
|
|
|
|
|
|
' lstProj.Clear
|
|
' strContain = Trim$(txtContains.Text)
|
|
|
|
' strSQL = "SELECT Proj_ID, Proj_Code, Proj_Desc, Proj_Cont FROM tblPROJECT WHERE Create > #01/01/2014#"
|
|
|
|
' Set oRS = New Recordset
|
|
' oRS.Open strSQL, goConn, _
|
|
' adOpenForwardOnly, adLockReadOnly
|
|
|
|
' Do Until oRS.EOF
|
|
|
|
' If Len(oRS!Proj_Desc) = 0 Then '1
|
|
' intYN = 0
|
|
' Else
|
|
' strADDRESS = Field2Str(oRS!Proj_Desc)
|
|
' intYN = InStr(1, UCase(Trim(strADDRESS)), UCase(Trim(txtContains))) ', vbTextCompare)
|
|
' End If
|
|
|
|
' If intYN > 0 Then
|
|
|
|
' strLine = Field2Str2(oRS!Proj_ID) & vbTab & RTrim(Field2Str(oRS!Proj_Code)) & vbTab & RTrim(Field2Str(oRS!Proj_Desc)) & vbTab & RTrim(Field2Str(oRS!Proj_Cont)) ' & " -- " & oRS!Desc
|
|
' lstProj.AddItem strLine
|
|
' End If
|
|
|
|
' oRS.MoveNext
|
|
'' mboolSHOW = True
|
|
' Loop
|
|
' oRS.Close
|
|
' If lstProj.ListCount = 0 Then
|
|
' MsgBox "No Project Information Found"
|
|
'' Call cmdNewSearch_Click
|
|
' Else
|
|
' lstProj.ListIndex = 0
|
|
' End If
|
|
'' End If '1
|
|
|
|
End Sub
|
|
|
|
Private Sub RepairLoad()
|
|
Dim oRS As Recordset
|
|
Dim strSQL As String, strLine As String, strTYPE As String
|
|
'Dim lngRET As Long, aTabs(2) As Long
|
|
|
|
On Error GoTo Error_EH
|
|
|
|
|
|
strSQL = "SELECT Repair_id, Proj_lot, Scheduled, Builder_PO, punch, yrend1, yrend2, wo, repair, backcharge from tblrepair WHERE lot_id = " & gintLOTID & " ORDER BY scheduled"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
|
|
|
lstRepairs.Clear
|
|
|
|
Do Until oRS.EOF
|
|
With lstRepairs
|
|
If oRS!punch Then
|
|
strTYPE = "PUNCH "
|
|
ElseIf oRS!yrend1 Then
|
|
strTYPE = "1 YEAR END"
|
|
ElseIf oRS!yrend2 Then
|
|
strTYPE = "2 YEAR END"
|
|
ElseIf oRS!wo Then
|
|
strTYPE = "PO WORK "
|
|
ElseIf oRS!repair Then
|
|
strTYPE = "WARRANTY"
|
|
ElseIf oRS!backcharge Then
|
|
strTYPE = "BACKCHARGE"
|
|
Else
|
|
strTYPE = "UNKNOWN"
|
|
End If
|
|
' strLine = ""
|
|
strLine = Field2Str2(oRS!repair_id) & vbTab & Field2Str(oRS!scheduled) & vbTab ' & Field2Str(oRS!completed) & vbTab
|
|
' strLine = Field2Str(oRS!scheduled) & " " & Field2Str(oRS!completed) & " "
|
|
strLine = strLine & strTYPE & vbTab & Field2Str(oRS!builder_PO) & vbTab & Field2Str(oRS!proj_lot)
|
|
' strLine = strLine & strTYPE & " " & Field2Str(oRS!proj_lot)
|
|
.AddItem strLine
|
|
' .ItemData(.NewIndex) = oRS!repair_ID
|
|
End With
|
|
oRS.MoveNext
|
|
Loop
|
|
oRS.Close
|
|
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
gstrMODULE = "Form WOList - Module RepairLoad"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Sub
|
|
End Sub
|
|
|
|
Private Sub CopyRepair()
|
|
Dim oRSR As Recordset, oRSPO As Recordset
|
|
Dim strSQL As String, strSQLL As String
|
|
Dim lngREP_ID As Long
|
|
|
|
' On Error GoTo Error_EH:
|
|
|
|
lstRepairs.col = 0
|
|
lngREP_ID = Field2Str2(lstRepairs.ColText)
|
|
strSQL = "SELECT * FROM tblREPAIR WHERE Repair_ID = " & lngREP_ID
|
|
' strSQL = "SELECT Repair_ID, SCHEDULED, Builder_Contact, Builder_Phone, Builder_PO, PO_Amt, Owner_Address, "
|
|
' strSQL = strSQL & "Owner_Name, VWP_Super, BC_WHO, Desc, Notes, Backcharge, WO, Repair FROM tblREPAIR WHERE Repair_ID = " & lngREP_ID
|
|
|
|
Set oRSR = New Recordset
|
|
oRSR.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If Not oRSR.EOF Then
|
|
strSQLL = "SELECT * FROM tblPOWO"
|
|
Set oRSPO = New Recordset
|
|
oRSPO.Open strSQLL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If Not oRSPO.EOF Then
|
|
oRSPO.AddNew
|
|
oRSPO!scheduled = oRSR!scheduled
|
|
oRSPO!builder_contact = Field2Str(oRSR!builder_contact)
|
|
oRSPO!builder_phone = Field2Str(oRSR!builder_phone)
|
|
oRSPO!builder_PO = Field2Str(oRSR!builder_PO)
|
|
oRSPO!PO_Amt = Field2Str2(oRSR!PO_Amt)
|
|
oRSPO!Owner_address = Field2Str(oRSR!Owner_address)
|
|
oRSPO!Owner_Name = Field2Str(oRSR!Owner_Name)
|
|
oRSPO!VWP_Super = Field2Str(oRSR!VWP_Super)
|
|
oRSPO!bc_who = Field2Str(oRSR!bc_who)
|
|
oRSPO!Desc = "REPAIR - " & Left(Field2Str(oRSR!Desc), 108)
|
|
oRSPO!notes = Field2Str(oRSR!notes)
|
|
oRSPO!backcharge = oRSR!backcharge
|
|
oRSPO!repair = oRSR!repair
|
|
oRSPO!wo = oRSR!wo
|
|
oRSPO!Orig_ID = oRSR!repair_id
|
|
oRSPO!Lot_ID = oRSR!Lot_ID
|
|
oRSPO!PROJ_ID = oRSR!PROJ_ID
|
|
oRSPO!proj_lot = oRSR!proj_lot
|
|
oRSPO.Update
|
|
End If
|
|
|
|
End If
|
|
|
|
Call GetPOID
|
|
' lstProj.col = 0
|
|
' gintREPAIRID = Field2Str2(lstProj.ColText)
|
|
frmPOWOLot.Show 1
|
|
Unload Me
|
|
|
|
|
|
End Sub
|
|
|
|
Private Sub GetPOID()
|
|
Dim oRSMAX As Recordset
|
|
Dim strSQL As String
|
|
On Error GoTo Error_EH
|
|
|
|
strSQL = "SELECT Max(REPAIR_ID) as MAXLotid from tblPOWO"
|
|
Set oRSMAX = New Recordset
|
|
oRSMAX.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
|
|
|
gintREPAIRID = oRSMAX!maxLotid
|
|
oRSMAX.Close
|
|
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
gstrMODULE = "Form LotInfo - Module GetLotID"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Sub
|
|
End Sub
|
|
|
|
Private Sub lstRepairs_DblClick()
|
|
Call CopyRepair
|
|
End Sub
|