Files
claudetools/clients/valleywide/app-modernization/source-code/Full-Project/VWP_PRNew/20171101FIX/frmOrderDates.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

1055 lines
30 KiB
Plaintext

VERSION 5.00
Begin VB.Form frmOrderDates
Caption = "Lot Date Information"
ClientHeight = 4845
ClientLeft = 60
ClientTop = 405
ClientWidth = 5415
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 4845
ScaleWidth = 5415
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton cmdRePrint
Caption = "RePrint"
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 = 3780
TabIndex = 27
Top = 2160
Visible = 0 'False
Width = 1395
End
Begin VB.Frame fraEdit
Height = 4080
Left = 3060
TabIndex = 17
Top = 60
Width = 435
Begin VB.OptionButton optSB
Height = 195
Left = 120
TabIndex = 24
Top = 3720
Width = 195
End
Begin VB.OptionButton optLB
Height = 195
Left = 120
TabIndex = 23
Top = 2890
Width = 195
End
Begin VB.OptionButton optTexture
Height = 195
Left = 120
TabIndex = 22
Top = 2360
Width = 195
End
Begin VB.OptionButton optScratch
Height = 195
Left = 120
TabIndex = 21
Top = 1830
Width = 195
End
Begin VB.OptionButton optBrown
Height = 195
Left = 120
TabIndex = 20
Top = 1300
Width = 195
End
Begin VB.OptionButton optSand
Height = 195
Left = 120
TabIndex = 19
Top = 770
Width = 195
End
Begin VB.OptionButton optLO
Height = 195
Left = 120
TabIndex = 18
Top = 240
Value = -1 'True
Width = 195
End
End
Begin VB.TextBox txtSandDate
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 2
Top = 770
Width = 1335
End
Begin VB.CommandButton cmdEdit
Caption = "E&dit"
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 = 3780
TabIndex = 9
Top = 1200
Visible = 0 'False
Width = 1395
End
Begin VB.CommandButton cmdSave
Caption = "&Save"
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 = 3780
TabIndex = 8
Top = 3120
Visible = 0 'False
Width = 1395
End
Begin VB.CommandButton cmdExit
Caption = "E&xit"
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 = 3780
TabIndex = 16
TabStop = 0 'False
Top = 240
Width = 1395
End
Begin VB.TextBox txtStuccoBill
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 7
Top = 3660
Width = 1335
End
Begin VB.TextBox txtLathBill
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 6
Top = 2880
Width = 1335
End
Begin VB.TextBox txtTextureDate
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 5
Top = 2360
Width = 1335
End
Begin VB.TextBox txtScratchDate
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 4
Top = 1800
Width = 1335
End
Begin VB.TextBox txtBrownDate
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 3
Top = 1300
Width = 1335
End
Begin VB.TextBox txtLathOrder
Enabled = 0 'False
Height = 315
Left = 1680
MaxLength = 10
TabIndex = 1
Top = 240
Width = 1335
End
Begin VB.Label lblStuccoInv
Height = 315
Left = 1680
TabIndex = 29
Top = 3990
Width = 1335
End
Begin VB.Label lblLathInv
Height = 315
Left = 1680
TabIndex = 28
Top = 3240
Width = 1335
End
Begin VB.Label txtTTLYds
Alignment = 1 'Right Justify
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 1680
TabIndex = 26
Top = 4440
Width = 1335
End
Begin VB.Label lblTtlYds
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Total Yards:"
Height = 195
Left = 660
TabIndex = 25
Top = 4500
Width = 855
End
Begin VB.Label lblStuccoBill
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Stucco Billing Date:"
Height = 195
Left = 120
TabIndex = 15
Top = 3720
Width = 1395
End
Begin VB.Label lblLathBill
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Lath Billing Date:"
Height = 195
Left = 315
TabIndex = 14
Top = 2950
Width = 1200
End
Begin VB.Label lblTextureDate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Texture Date:"
Height = 195
Left = 540
TabIndex = 13
Top = 2420
Width = 975
End
Begin VB.Label lblScratchDate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Scratch Date:"
Height = 195
Left = 525
TabIndex = 12
Top = 1890
Width = 990
End
Begin VB.Label lblBrownDate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Brown Date:"
Height = 195
Left = 630
TabIndex = 11
Top = 1360
Width = 885
End
Begin VB.Label lblSandDate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Sand Date:"
Height = 195
Left = 705
TabIndex = 10
Top = 830
Width = 810
End
Begin VB.Label lblLathDate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "Lath Date:"
Height = 195
Left = 765
TabIndex = 0
Top = 300
Width = 750
End
End
Attribute VB_Name = "frmOrderDates"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim moRS As Recordset
Dim mboolSHOW As Boolean
Dim strCHECK As String
Private Sub cmdEdit_Click()
If gbytSECURITY < 3 Then
If optLO Then
txtLathOrder.Enabled = True
txtLathOrder.SetFocus
cmdSave.Visible = True
ElseIf optSand Then
txtSandDate.Enabled = True
txtSandDate.SetFocus
cmdSave.Visible = True
ElseIf optBrown Then
txtBrownDate.Enabled = True
txtBrownDate.SetFocus
cmdSave.Visible = True
ElseIf optScratch Then
txtScratchDate.Enabled = True
txtScratchDate.SetFocus
cmdSave.Visible = True
ElseIf optTexture Then
txtTextureDate.Enabled = True
txtTextureDate.SetFocus
cmdSave.Visible = True
ElseIf optLB Then
txtLathBill.Enabled = True
txtLathBill.SetFocus
cmdSave.Visible = True
ElseIf optSB Then
txtStuccoBill.Enabled = True
txtStuccoBill.SetFocus
cmdSave.Visible = True
End If
End If
If gbytSECURITY = 6 Then
If optLO Then
txtLathOrder.Enabled = True
txtLathOrder.SetFocus
cmdSave.Visible = True
ElseIf optSand Then
txtSandDate.Enabled = True
txtSandDate.SetFocus
cmdSave.Visible = True
ElseIf optBrown Then
txtBrownDate.Enabled = True
txtBrownDate.SetFocus
cmdSave.Visible = True
ElseIf optScratch Then
txtScratchDate.Enabled = True
txtScratchDate.SetFocus
cmdSave.Visible = True
ElseIf optTexture Then
txtTextureDate.Enabled = True
txtTextureDate.SetFocus
cmdSave.Visible = True
ElseIf optLB Then
txtLathBill.Enabled = True
txtLathBill.SetFocus
cmdSave.Visible = True
ElseIf optSB Then
txtStuccoBill.Enabled = True
txtStuccoBill.SetFocus
cmdSave.Visible = True
End If
End If
If gbytSECURITY = 7 Then
If optLB Then
txtLathBill.Enabled = True
txtLathBill.SetFocus
cmdSave.Visible = True
ElseIf optSB Then
txtStuccoBill.Enabled = True
txtStuccoBill.SetFocus
cmdSave.Visible = True
End If
End If
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdRePrint_Click()
Dim oRS As Recordset
Dim strSQL As String
If optSand Then
If txtBrownDate = "" Then
strSQL = "SELECT * FROM tblOrders WHERE percentage = 100 and m_type = 'A' and lot_id = " & gintLOTID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
Do Until oRS.EOF
oRS!m_type = "H"
oRS!d_flag = "X"
oRS!ar_trans = vbChecked
oRS!ap_trans = vbChecked
oRS!notes = " Order Not Printed & Reset On " & Now() & " by " & gstrLOGIN
oRS.Update
oRS.MoveNext
Loop
moRS!a_flg = vbFalse
txtSandDate = ""
Else
MsgBox "Brown Date Must Be ReSet First", vbOKOnly, "Reset Brown"
Exit Sub
End If
ElseIf optBrown Then
If txtScratchDate = "" And txtTextureDate = "" Then
strSQL = "SELECT * FROM tblOrders WHERE percentage = 100 and m_type = 'B' and lot_id = " & gintLOTID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
Do Until oRS.EOF
oRS!m_type = "H"
oRS!d_flag = "X"
oRS!ar_trans = vbChecked
oRS!ap_trans = vbChecked
oRS!notes = " Order Not Printed & Reset On " & Now() & " by " & gstrLOGIN
oRS.Update
oRS.MoveNext
Loop
moRS!b_flg = vbFalse
txtBrownDate = ""
Else
MsgBox "Scratch/Texture Date Must Be ReSet First", vbOKOnly, "Reset Dates"
Exit Sub
End If
ElseIf optScratch Then
If txtTextureDate = "" Then
strSQL = "SELECT * FROM tblOrders WHERE percentage = 100 and m_type = 'S' and lot_id = " & gintLOTID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
Do Until oRS.EOF
oRS!m_type = "H"
oRS!d_flag = "X"
oRS!ar_trans = vbChecked
oRS!ap_trans = vbChecked
oRS!notes = " Order Not Printed & Reset On " & Now() & " by " & gstrLOGIN
oRS.Update
oRS.MoveNext
Loop
moRS!c_flg = vbFalse
txtScratchDate = ""
Else
MsgBox "Texture Date Must Be ReSet First", vbOKOnly, "Reset Dates"
Exit Sub
End If
ElseIf optTexture Then
strSQL = "SELECT * FROM tblOrders WHERE percentage = 100 and m_type = 'T' and lot_id = " & gintLOTID
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
Do Until oRS.EOF
oRS!m_type = "H"
oRS!d_flag = "X"
oRS!ar_trans = vbChecked
oRS!ap_trans = vbChecked
oRS!notes = " Order Not Printed & Reset On " & Now() & " by " & gstrLOGIN
oRS.Update
oRS.MoveNext
Loop
moRS!t_flg = vbFalse
txtTextureDate = ""
strSQL = "DELETE * FROM tblARInvoice where Inv_Type = 'S' and lot_id = " & gintLOTID
goConn.Execute strSQL
strSQL = "DELETE * FROM tblARInvoice where Inv_Type = 'V' and lot_id = " & gintLOTID
goConn.Execute strSQL
strSQL = "DELETE * FROM tblARInvoice where Inv_Type = 'C' and lot_id = " & gintLOTID
goConn.Execute strSQL
End If
txtLathOrder.Enabled = False
txtSandDate.Enabled = False
txtBrownDate.Enabled = False
txtScratchDate.Enabled = False
txtTextureDate.Enabled = False
txtLathBill.Enabled = False
txtStuccoBill.Enabled = False
cmdSave.Visible = False
cmdRePrint.Visible = False
Call FieldsSave
End Sub
Private Sub cmdSave_Click()
txtLathOrder.Enabled = False
txtSandDate.Enabled = False
txtBrownDate.Enabled = False
txtScratchDate.Enabled = False
txtTextureDate.Enabled = False
txtLathBill.Enabled = False
txtStuccoBill.Enabled = False
cmdSave.Visible = False
Call FieldsSave
End Sub
Private Sub Form_Load()
On Error GoTo Error_EH
If gbytSECURITY < 3 Then
optLO.Enabled = True
optBrown.Enabled = True
optSand.Enabled = True
optScratch.Enabled = True
optTexture.Enabled = True
optLB.Enabled = True
optSB.Enabled = True
fraEdit.Visible = True
cmdEdit.Visible = True
ElseIf gbytSECURITY = 6 Then
optLO.Enabled = True
optBrown.Enabled = True
optSand.Enabled = True
optScratch.Enabled = True
optTexture.Enabled = True
fraEdit.Visible = True
cmdEdit.Visible = True
ElseIf gbytSECURITY = 7 Then
optLB.Enabled = True
optSB.Enabled = True
fraEdit.Visible = True
cmdEdit.Visible = True
End If
If FormFind() Then
Call FormShow
End If
Exit Sub
Error_EH:
gstrMODULE = "Form OrderDates - Module Form_Load"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Function FormFind() As Boolean
Dim strSQL As String
On Error GoTo Error_EH
strSQL = "SELECT * "
strSQL = strSQL & "FROM tblLotInfo "
strSQL = strSQL & "WHERE Lot_ID = " & gintLOTID
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 OrderDates - Module FormFind"
Call ErrorHandler2
gstrMODULE = ""
Exit Function
End Function
Private Sub FormShow()
Dim strSQL As String, oRS As Recordset, strLathINV As String, strSuccoINV As String
On Error GoTo Error_EH
mboolSHOW = True
With moRS
txtLathOrder = IIf(Field2Str(!lorder) = "12:00:00 AM", "", Field2Str(!lorder))
txtSandDate = IIf(Field2Str(!Border) = "12:00:00 AM", "", Field2Str(!Border))
txtScratchDate = IIf(Field2Str(!TORDER) = "12:00:00 AM", "", Field2Str(!TORDER))
txtBrownDate = IIf(Field2Str(!forder) = "12:00:00 AM", "", Field2Str(!forder))
txtTextureDate = IIf(Field2Str(!SORDER) = "12:00:00 AM", "", Field2Str(!SORDER))
txtLathBill = IIf(Field2Str(!billdt_L) = "12:00:00 AM", "", Field2Str(!billdt_L))
txtStuccoBill = IIf(Field2Str(!billdt_S) = "12:00:00 AM", "", Field2Str(!billdt_S))
txtTTLYds = Field2Str(!sq_yd)
End With
strSQL = "SELECT Lot_id, Invoice_NO, Inv_Type, Header FROM tblARINVOICE WHERE INV_TYPE = 'L' AND LOT_ID = " & Field2Str2(moRS!Lot_id)
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not oRS.EOF Then
lblLathInv = Field2Str(oRS!invoice_no)
End If
oRS.Close
strSQL = "SELECT Lot_id, Invoice_NO, Inv_Type, Header FROM tblARINVOICE WHERE HEADER AND INV_TYPE = 'S' AND LOT_ID = " & Field2Str2(moRS!Lot_id)
Set oRS = New Recordset
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
If Not oRS.EOF Then
lblStuccoInv = Field2Str(oRS!invoice_no)
End If
mboolSHOW = False
Exit Sub
Error_EH:
gstrMODULE = "Form OrderDates - Module FormShow"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub optBrown_Click()
cmdRePrint.Visible = True
End Sub
Private Sub optSand_Click()
cmdRePrint.Visible = True
End Sub
Private Sub optScratch_Click()
cmdRePrint.Visible = True
End Sub
Private Sub optTexture_Click()
cmdRePrint.Visible = True
End Sub
Private Sub txtBrownDate_GotFocus()
Call FieldSelect(txtBrownDate)
End Sub
Private Sub txtBrownDate_LostFocus()
Dim lngPOS As Long
If IsDate(txtBrownDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtBrownDate, "/", 1)
If lngPOS = 0 Then
If Len(txtBrownDate) > 0 Then
txtBrownDate = Format(txtBrownDate, "00/00/####")
If Not IsDate(txtBrownDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtBrownDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtBrownDate.SetFocus
End If
End Sub
Private Sub txtBrownDate_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtBrownDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtBrownDate, "/", 1)
If lngPOS = 0 Then
If Len(txtBrownDate) > 0 Then
txtBrownDate = Format(txtBrownDate, "00/00/####")
If Not IsDate(txtBrownDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtBrownDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtBrownDate.SetFocus
End If
End Sub
Private Sub txtLathBill_GotFocus()
Call FieldSelect(txtLathBill)
End Sub
Private Sub txtLathBill_LostFocus()
Dim lngPOS As Long
If IsDate(txtLathBill) Then
Exit Sub
End If
lngPOS = InStr(1, txtLathBill, "/", 1)
If lngPOS = 0 Then
If Len(txtLathBill) > 0 Then
txtLathBill = Format(txtLathBill, "00/00/####")
If Not IsDate(txtLathBill) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtLathBill.SetFocus
Exit Sub
Else
txtLathBill.Enabled = False
' cmdLathBilling.Enabled = False
End If
moRS!billdt_L = Str2Field(txtLathBill)
moRS.Update
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtLathBill.SetFocus
End If
End Sub
Private Sub txtLathBill_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtLathBill) Then
Exit Sub
End If
lngPOS = InStr(1, txtLathBill, "/", 1)
If lngPOS = 0 Then
If Len(txtLathBill) > 0 Then
txtLathBill = Format(txtLathBill, "00/00/####")
If Not IsDate(txtLathBill) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtLathBill.SetFocus
Exit Sub
Else
txtLathBill.Enabled = False
' cmdLathBilling.Enabled = False
End If
moRS!billdt_L = Str2Field(txtLathBill)
moRS.Update
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtLathBill.SetFocus
End If
End Sub
Private Sub txtLathOrder_GotFocus()
Call FieldSelect(txtLathOrder)
End Sub
Private Sub txtLathOrder_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtLathOrder) Then
Exit Sub
End If
lngPOS = InStr(1, txtLathOrder, "/", 1)
If lngPOS = 0 Then
If Len(txtLathOrder) > 0 Then
txtLathOrder = Format(txtLathOrder, "00/00/####")
If Not IsDate(txtLathOrder) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtLathOrder.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtLathOrder.SetFocus
End If
End Sub
Private Sub txtSandDate_GotFocus()
Call FieldSelect(txtSandDate)
End Sub
Private Sub txtSandDate_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtSandDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtSandDate, "/", 1)
If lngPOS = 0 Then
If Len(txtSandDate) > 0 Then
txtSandDate = Format(txtSandDate, "00/00/####")
If Not IsDate(txtSandDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtSandDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtSandDate.SetFocus
End If
End Sub
Private Sub txtScratchDate_GotFocus()
Call FieldSelect(txtScratchDate)
End Sub
Private Sub txtScratchDate_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtScratchDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtScratchDate, "/", 1)
If lngPOS = 0 Then
If Len(txtScratchDate) > 0 Then
txtScratchDate = Format(txtScratchDate, "00/00/####")
If Not IsDate(txtScratchDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtScratchDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtScratchDate.SetFocus
End If
End Sub
Private Sub txtStuccoBill_GotFocus()
Call FieldSelect(txtStuccoBill)
End Sub
Private Sub txtStuccoBill_LostFocus()
Dim lngPOS As Long
If IsDate(txtStuccoBill) Then
Exit Sub
End If
lngPOS = InStr(1, txtStuccoBill, "/", 1)
If lngPOS = 0 Then
If Len(txtStuccoBill) > 0 Then
txtStuccoBill = Format(txtStuccoBill, "00/00/####")
If Not IsDate(txtStuccoBill) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtStuccoBill.SetFocus
Exit Sub
Else
txtStuccoBill.Enabled = False
End If
moRS!billdt_S = Str2Field(txtStuccoBill)
moRS.Update
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtStuccoBill.SetFocus
End If
End Sub
Private Sub txtLathOrder_LostFocus()
Dim lngPOS As Long
If IsDate(txtLathOrder) Then
Exit Sub
End If
lngPOS = InStr(1, txtLathOrder, "/", 1)
If lngPOS = 0 Then
If Len(txtLathOrder) > 0 Then
txtLathOrder = Format(txtLathOrder, "00/00/####")
If Not IsDate(txtLathOrder) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtLathOrder.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtLathOrder.SetFocus
End If
End Sub
Private Sub txtSandDate_LostFocus()
Dim lngPOS As Long
If IsDate(txtSandDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtSandDate, "/", 1)
If lngPOS = 0 Then
If Len(txtSandDate) > 0 Then
txtSandDate = Format(txtSandDate, "00/00/####")
If Not IsDate(txtSandDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtSandDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtSandDate.SetFocus
End If
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 txtScratchDate_LostFocus()
Dim lngPOS As Long
If IsDate(txtScratchDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtScratchDate, "/", 1)
If lngPOS = 0 Then
If Len(txtScratchDate) > 0 Then
txtScratchDate = Format(txtScratchDate, "00/00/####")
If Not IsDate(txtScratchDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtScratchDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtScratchDate.SetFocus
End If
End Sub
Private Sub txtStuccoBill_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtStuccoBill) Then
Exit Sub
End If
lngPOS = InStr(1, txtStuccoBill, "/", 1)
If lngPOS = 0 Then
If Len(txtStuccoBill) > 0 Then
txtStuccoBill = Format(txtStuccoBill, "00/00/####")
If Not IsDate(txtStuccoBill) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtStuccoBill.SetFocus
Exit Sub
Else
txtStuccoBill.Enabled = False
End If
moRS!billdt_S = Str2Field(txtStuccoBill)
moRS.Update
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtStuccoBill.SetFocus
End If
End Sub
Private Sub txtTextureDate_GotFocus()
Call FieldSelect(txtTextureDate)
End Sub
Private Sub txtTextureDate_LostFocus()
Dim lngPOS As Long
If IsDate(txtTextureDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtTextureDate, "/", 1)
If lngPOS = 0 Then
If Len(txtTextureDate) > 0 Then
txtTextureDate = Format(txtTextureDate, "00/00/####")
If Not IsDate(txtTextureDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtTextureDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtTextureDate.SetFocus
End If
End Sub
Private Sub FieldsSave()
On Error GoTo Error_EH
With moRS
!lorder = Date2Field(txtLathOrder)
!SORDER = Str2Field(txtTextureDate)
!Border = Str2Field(txtSandDate)
!TORDER = Str2Field(txtScratchDate)
!forder = Str2Field(txtBrownDate)
!billdt_L = Str2Field(txtLathBill)
!billdt_S = Str2Field(txtStuccoBill)
!LUUser = gstrLOGIN
!Update = Date
End With
moRS.Update
Exit Sub
Error_EH:
gstrMODULE = "Form OrderDates - Module FieldsSave"
Call ErrorHandler2
gstrMODULE = ""
Exit Sub
End Sub
Private Sub txtTextureDate_Validate(Cancel As Boolean)
Dim lngPOS As Long
If IsDate(txtTextureDate) Then
Exit Sub
End If
lngPOS = InStr(1, txtTextureDate, "/", 1)
If lngPOS = 0 Then
If Len(txtTextureDate) > 0 Then
txtTextureDate = Format(txtTextureDate, "00/00/####")
If Not IsDate(txtTextureDate) Then
MsgBox "The Date You Entered is not Valid - ReEnter"
txtTextureDate.SetFocus
Exit Sub
End If
End If
Else
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
txtTextureDate.SetFocus
End If
End Sub