Files
claudetools/clients/valleywide/app-modernization/source-code/Orders-VWP_Current-2020/frmShowPO.frm
Mike Swanson fccf9f9468 sync: auto-sync from GURU-5070 at 2026-06-14 05:33:01
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-14 05:33:01
2026-06-14 05:34:46 -07:00

487 lines
14 KiB
Plaintext

VERSION 5.00
Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx"
Begin VB.Form frmShowPO
Caption = "Show PO Information:"
ClientHeight = 5805
ClientLeft = 60
ClientTop = 345
ClientWidth = 5190
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 5805
ScaleWidth = 5190
StartUpPosition = 3 'Windows Default
Begin LpLib.fpList lstPOMaterial
Height = 1065
Left = 420
TabIndex = 18
Top = 3165
Width = 4515
_Version = 196608
_ExtentX = 7964
_ExtentY = 1879
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Enabled = -1 'True
MousePointer = 0
Object.TabStop = 0 'False
BackColor = -2147483643
ForeColor = -2147483640
Columns = 5
Sorted = 0
LineWidth = 1
SelDrawFocusRect= -1 'True
ColumnSeparatorChar= 9
ColumnSearch = -1
ColumnWidthScale= 2
RowHeight = -1
MultiSelect = 0
WrapList = 0 'False
WrapWidth = 0
SelMax = -1
AutoSearch = 1
SearchMethod = 0
VirtualMode = 0 'False
VRowCount = 0
DataSync = 3
ThreeDInsideStyle= 1
ThreeDInsideHighlightColor= -2147483633
ThreeDInsideShadowColor= -2147483627
ThreeDInsideWidth= 1
ThreeDOutsideStyle= 1
ThreeDOutsideHighlightColor= -2147483628
ThreeDOutsideShadowColor= -2147483632
ThreeDOutsideWidth= 1
ThreeDFrameWidth= 0
BorderStyle = 0
BorderColor = -2147483642
BorderWidth = 1
ThreeDOnFocusInvert= 0 'False
ThreeDFrameColor= -2147483633
Appearance = 2
BorderDropShadow= 0
BorderDropShadowColor= -2147483632
BorderDropShadowWidth= 3
ScrollHScale = 2
ScrollHInc = 0
ColsFrozen = 0
ScrollBarV = 1
NoIntegralHeight= 0 'False
HighestPrecedence= 0
AllowColResize = 0
AllowColDragDrop= 0
ReadOnly = 0 'False
VScrollSpecial = 0 'False
VScrollSpecialType= 0
EnableKeyEvents = -1 'True
EnableTopChangeEvent= -1 'True
DataAutoHeadings= -1 'True
DataAutoSizeCols= 2
SearchIgnoreCase= -1 'True
ScrollBarH = 1
VirtualPageSize = 0
VirtualPagesAhead= 0
ExtendCol = 0
ColumnLevels = 1
ListGrayAreaColor= -2147483637
GroupHeaderHeight= -1
GroupHeaderShow = 0 'False
AllowGrpResize = 0
AllowGrpDragDrop= 0
MergeAdjustView = 0 'False
ColumnHeaderShow= 0 'False
ColumnHeaderHeight= -1
GrpsFrozen = 0
BorderGrayAreaColor= -2147483637
ExtendRow = 0
DataField = ""
OLEDragMode = 0
OLEDropMode = 0
EnableClickEvent= -1 'True
Redraw = -1 'True
ResizeRowToFont = 0 'False
TextTipMultiLine= 0
ColDesigner = "frmShowPO.frx":0000
End
Begin VB.TextBox txtPONum
Enabled = 0 'False
Height = 315
Left = 1020
TabIndex = 9
Top = 120
Width = 855
End
Begin VB.TextBox txtPODate
Enabled = 0 'False
Height = 315
Left = 2880
TabIndex = 8
Top = 120
Width = 1455
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 = 960
TabIndex = 3
Top = 5220
Width = 1275
End
Begin VB.TextBox txtPONotes
Enabled = 0 'False
Height = 1215
Left = 1020
MaxLength = 250
MultiLine = -1 'True
TabIndex = 2
Top = 1560
Width = 3915
End
Begin VB.TextBox txtPODesc
Enabled = 0 'False
Height = 315
Left = 1020
MaxLength = 30
TabIndex = 1
Top = 840
Width = 3315
End
Begin VB.TextBox txtIssueTo
Enabled = 0 'False
Height = 315
Left = 1020
MaxLength = 20
TabIndex = 0
Top = 480
Width = 3315
End
Begin VB.Label lblCUser
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 = 285
Left = 1020
TabIndex = 17
Top = 4500
Width = 555
End
Begin VB.Label lblUDate
BorderStyle = 1 'Fixed Single
Height = 285
Left = 1680
TabIndex = 16
Top = 4800
Width = 3255
End
Begin VB.Label lblUUser
BorderStyle = 1 'Fixed Single
Height = 285
Left = 1020
TabIndex = 15
Top = 4800
Width = 555
End
Begin VB.Label lblUpdate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Updated:"
Height = 195
Left = 255
TabIndex = 14
Top = 4860
Width = 660
End
Begin VB.Label lblCreate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Created:"
Height = 195
Left = 315
TabIndex = 13
Top = 4560
Width = 600
End
Begin VB.Label lblCDate
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 = 285
Left = 1680
TabIndex = 12
Top = 4500
Width = 3255
End
Begin VB.Label lblPOMaterial
AutoSize = -1 'True
Caption = "P.O. Materials:"
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 = 195
Left = 1080
TabIndex = 11
Top = 2880
Width = 1275
End
Begin VB.Label lblPODate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "PO Date:"
Enabled = 0 'False
Height = 195
Left = 2100
TabIndex = 10
Top = 180
Width = 660
End
Begin VB.Label lblPONotes
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "P.O. Notes:"
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 = 195
Left = 1080
TabIndex = 7
Top = 1260
Width = 1005
End
Begin VB.Label lblDesc
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Description:"
Enabled = 0 'False
Height = 195
Left = 75
TabIndex = 6
Top = 960
Width = 840
End
Begin VB.Label lblIssue
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Issued To:"
Enabled = 0 'False
Height = 195
Left = 165
TabIndex = 5
Top = 600
Width = 750
End
Begin VB.Label lblPONum
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "PO Number:"
Enabled = 0 'False
Height = 195
Left = 120
TabIndex = 4
Top = 240
Width = 870
End
End
Attribute VB_Name = "frmShowPO"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mintPOID As Integer
Dim moRS As Recordset
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = 4 Then
Exit Sub
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()
On Error GoTo Error_EH
' Call CrewLoad
' Call FormClear
' Call GetLotInfo
If FormFind() Then
Call FormShow
Else
MsgBox "No Information Was Found For This Repair", vbOKOnly, "No Information"
Unload Me
End If
Exit Sub
Error_EH:
gstrMODULE = "Form ShowPO - Module Form_Load"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Function FormFind() As Boolean
Dim strSQL As String, strPlan As String, strMEMO As String
On Error GoTo Error_EH
strSQL = "SELECT * "
strSQL = strSQL & "FROM tblPOrder "
strSQL = strSQL & "WHERE ponum = " & glngORDERID
' strSQL = strSQL & "WHERE ponum = " & gintPONUM
Set moRS = New Recordset
moRS.Open strSQL, goConn, _
adOpenKeyset, adLockPessimistic
If moRS.EOF Then
FormFind = False
Else
FormFind = True
End If
Exit Function
Error_EH:
gstrMODULE = "Form ShowPO - Module FormFind"
Call ErrorHandler2
gstrMODULE = ""
Exit Function
End Function
Private Sub FormShow()
Dim mstrAREA As String
Dim strSQL As String
Dim oRS As Recordset
On Error GoTo Error_EH
With moRS
txtPONum = Field2Str(!ponum)
txtPODate = Field2Str(!Date)
txtIssueTo = Field2Str(!towhom)
txtPODesc = Field2Str(!Desc)
txtPONotes = Field2Str(!notes)
lblCUser.Caption = Field2Str(!User)
lblCDate.Caption = Field2Str(!Create)
lblUUser.Caption = Field2Str(!Up_User)
lblUDate.Caption = Field2Str(!Update)
Call POMatLoad
End With
Exit Sub
Error_EH:
If Err = 3021 Then
MsgBox "No Project Was Found = Be Sure To Click The Get Lot Button", vbOKOnly, "No Project"
Resume Next
End If
gstrMODULE = "Form ShowPO - Module FormShow"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub POMatLoad()
Dim oRS As Recordset
Dim strSQL As String
Dim strLine As String
On Error GoTo Error_EH
strSQL = "SELECT PONum, Inv_no, Desc, Qty, D_Flag, M_Type FROM tblPOrdMat WHERE PONum = " & glngORDERID & " ORDER BY Inv_No"
' strSQL = "SELECT PONum, Inv_no, Desc, Qty, D_Flag, M_Type FROM tblPOrdMat WHERE PONum = " & gintPONUM & " ORDER BY Inv_No"
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
lstPOMaterial.Clear
Do Until oRS.EOF
With lstPOMaterial
strLine = oRS("D_Flag") & vbTab & oRS("M_Type") & vbTab & oRS("Qty") & vbTab & oRS("Inv_No") & vbTab & oRS("desc")
' strLine = oRS("D_Flag") & " " & oRS("M_Type") & " " & oRS("Qty") & vbTab & oRS("Inv_No") & vbTab & oRS("desc")
.AddItem strLine
' .ItemData(.NewIndex) = oRS("inv_no")
End With
oRS.MoveNext
Loop
oRS.Close
' If lstPOMaterial.ListCount Then
' lstPOMaterial.ListIndex = 0
' Else
' txtPOInvNo = "0"
' txtPOMatDesc = ""
' txtPOQty = "0"
' cboPODFlag.ListIndex = -1
' cboPOMType.ListIndex = -1
' End If
Exit Sub
Error_EH:
gstrMODULE = "Form ShowPO - Module POMatLoad"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub