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
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -111,3 +111,4 @@ temp/
|
||||
# Wiki synthesis staging (transient; review-before-apply). Keep only the README.
|
||||
.claude/wiki_staging/*
|
||||
!.claude/wiki_staging/README.md
|
||||
.tmp-*
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import os, paramiko
|
||||
host="192.168.0.104"; user="root"; pw=os.environ["XEN_PW"]
|
||||
c=paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect(host, username=user, password=pw, timeout=20,
|
||||
disabled_algorithms={'pubkeys': ['rsa-sha2-256','rsa-sha2-512']},
|
||||
look_for_keys=False, allow_agent=False)
|
||||
def run(cmd):
|
||||
i,o,e=c.exec_command(cmd,timeout=120); return (o.read().decode(errors="replace")+e.read().decode(errors="replace")).strip()
|
||||
g_vdi="828ea0ff-04c7-4f7c-9e4d-baa9e15d72bd" # G: = "2003 Disk 2" xvdb
|
||||
print("=== snapshotting G: VDI for consistent export ===")
|
||||
snap=run(f'xe vdi-snapshot uuid={g_vdi}')
|
||||
print("snapshot VDI uuid:", snap)
|
||||
print("=== snapshot details ===")
|
||||
print(run(f"xe vdi-param-list uuid={snap} | grep -iE 'uuid \\(|name-label|virtual-size|is-a-snapshot|sr-name-label'"))
|
||||
print("=== dom0 free space (confirm we must stream, not stage locally) ===")
|
||||
print(run("df -h / /var/tmp 2>/dev/null | head"))
|
||||
c.close()
|
||||
@@ -1,18 +0,0 @@
|
||||
import os, paramiko
|
||||
host="192.168.0.104"; user="root"; pw=os.environ["XEN_PW"]
|
||||
c=paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect(host, username=user, password=pw, timeout=20,
|
||||
disabled_algorithms={'pubkeys': ['rsa-sha2-256','rsa-sha2-512']},
|
||||
look_for_keys=False, allow_agent=False)
|
||||
def run(cmd):
|
||||
i,o,e=c.exec_command(cmd,timeout=60); return (o.read().decode(errors="replace")+e.read().decode(errors="replace")).strip()
|
||||
# Generate a temporary XenAPI session ref for the HTTP export (avoids putting root pw in the RMM command log)
|
||||
pyc = (
|
||||
"import XenAPI;"
|
||||
"s=XenAPI.Session('https://localhost');"
|
||||
"s.login_with_password('root', __import__('os').environ['XPW'], '1.0', 'g-migration');"
|
||||
"print(s._session)"
|
||||
)
|
||||
out=run(f"XPW='{pw}' python -c \"{pyc}\"")
|
||||
print("SESSION_REF:", out)
|
||||
c.close()
|
||||
@@ -73,3 +73,22 @@ No `.vbp` project file, no other forms/modules. The 19 `.vbp` / 44 `.frm` elsewh
|
||||
data DB; plus other Darv-project DBs (HealthCare/ACA). Pull on demand.
|
||||
|
||||
**Next:** run VB Decompiler Pro against `ORDERS0727-2015.exe` (P-Code -> ~70-80% recovery).
|
||||
|
||||
---
|
||||
|
||||
## Update 2026-06-13 (later) — SOURCE FULLY RECOVERED (supersedes "still lost" above)
|
||||
|
||||
The complete VWP "Orders" VB6 source was recovered from **`F:\Darv\Darv.rar`** on
|
||||
**WINFileSvr (192.168.0.35)** — a 51 GB backup of Darv's dev machine (extracted to
|
||||
`F:\Darv\Darv-rar`, 135 GB). The full project tree is present, with multiple versions:
|
||||
- **Newest:** `…\Kingston\Project\VWP_Current\ORDERS_C.vbp` (2020-06-09) — 128 `.frm`, 4 `.bas`;
|
||||
`ORDERS_C` references 80 forms + 10 OCX (TABCTL32, Crystal `Crystl32`, True DBGrid, FarPoint Spread).
|
||||
- Also: `VWP_Inv`, `VWP_Update`, `VWP_Current_0317`; historical `ORDERSold.vbp` (2002), `ORDERSSave`.
|
||||
|
||||
**Staged to repo:** `source-code/Orders-VWP_Current-2020/` — 12.2 MB pure source
|
||||
(147 `.frm`, 4 `.bas`, 5 `.vbp`). Databases left on the server.
|
||||
|
||||
**Decompilation (VB Decompiler Pro) is NO LONGER NEEDED** — we have the real, buildable source.
|
||||
Stack now confirmed from source: **VB6 (P-Code), Jet/Access `.mdb`, Crystal Reports, heavy OCX
|
||||
dependency** (TABCTL32, True DBGrid Pro, FarPoint Spread, Flp32a30). Next: set up a VB6 build env
|
||||
to confirm it compiles, then scope the modernization from actual source. Tracked on ticket #32280.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
VERSION 5.00
|
||||
Begin {BD4B4E61-F7B8-11D0-964D-00A0C9273C2A} CrystalReport2
|
||||
ClientHeight = 7920
|
||||
ClientLeft = 0
|
||||
ClientTop = 0
|
||||
ClientWidth = 10935
|
||||
OleObjectBlob = "CrystalReport2.dsx":0000
|
||||
End
|
||||
Attribute VB_Name = "CrystalReport2"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
VERSION 5.00
|
||||
Begin {78E93846-85FD-11D0-8487-00A0C90DC8A9} DataReport1
|
||||
Bindings = "DataReport1.dsx":0000
|
||||
Caption = "DataReport1"
|
||||
ClientHeight = 8595
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 11880
|
||||
StartUpPosition = 2 'CenterScreen
|
||||
WindowState = 2 'Maximized
|
||||
_ExtentX = 20955
|
||||
_ExtentY = 15161
|
||||
_Version = 393216
|
||||
_DesignerVersion= 100684101
|
||||
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
||||
Name = "Arial"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
GridX = 10
|
||||
GridY = 10
|
||||
LeftMargin = 1440
|
||||
RightMargin = 1440
|
||||
TopMargin = 1440
|
||||
BottomMargin = 1440
|
||||
NumSections = 5
|
||||
SectionCode0 = 1
|
||||
BeginProperty Section0 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Section4"
|
||||
Object.Height = 435
|
||||
NumControls = 1
|
||||
ItemType0 = 3
|
||||
BeginProperty Item0 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Label1"
|
||||
Object.Top = 144
|
||||
Object.Width = 7488
|
||||
Object.Height = 285
|
||||
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
||||
Name = "Arial"
|
||||
Size = 12
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Object.Caption = "this is a test to see if a header prints"
|
||||
CanGrow = -1 'True
|
||||
Alignment = 2
|
||||
EndProperty
|
||||
EndProperty
|
||||
SectionCode1 = 2
|
||||
BeginProperty Section1 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Section2"
|
||||
Object.Height = 570
|
||||
NumControls = 1
|
||||
ItemType0 = 3
|
||||
BeginProperty Item0 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Label2"
|
||||
Object.Top = 144
|
||||
Object.Width = 7488
|
||||
Object.Height = 420
|
||||
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
||||
Name = "Arial"
|
||||
Size = 12
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Object.Caption = "This is a page header and this is how it prints"
|
||||
Alignment = 2
|
||||
EndProperty
|
||||
EndProperty
|
||||
SectionCode2 = 4
|
||||
BeginProperty Section2 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Section1"
|
||||
Object.Height = 1440
|
||||
NumControls = 2
|
||||
ItemType0 = 4
|
||||
BeginProperty Item0 {1C13A8E2-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Text1"
|
||||
Object.Left = 144
|
||||
Object.Top = 720
|
||||
Object.Width = 1725
|
||||
Object.Height = 285
|
||||
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
||||
Name = "Arial"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
DataField = "proj_desc"
|
||||
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
|
||||
Type = 0
|
||||
Format = ""
|
||||
HaveTrueFalseNull= 0
|
||||
FirstDayOfWeek = 0
|
||||
FirstWeekOfYear = 0
|
||||
LCID = 1033
|
||||
SubFormatType = 0
|
||||
EndProperty
|
||||
EndProperty
|
||||
ItemType1 = 3
|
||||
BeginProperty Item1 {1C13A8E1-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Label3"
|
||||
Object.Left = 720
|
||||
Object.Top = 144
|
||||
Object.Width = 1728
|
||||
Object.Height = 288
|
||||
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
||||
Name = "Arial"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Object.Caption = "This is a test"
|
||||
EndProperty
|
||||
EndProperty
|
||||
SectionCode3 = 7
|
||||
BeginProperty Section3 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Section3"
|
||||
Object.Height = 360
|
||||
NumControls = 0
|
||||
EndProperty
|
||||
SectionCode4 = 8
|
||||
BeginProperty Section4 {1C13A8E0-A0B6-11D0-848E-00A0C90DC8A9}
|
||||
_Version = 393216
|
||||
Name = "Section5"
|
||||
Object.Height = 360
|
||||
NumControls = 0
|
||||
EndProperty
|
||||
End
|
||||
Attribute VB_Name = "DataReport1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRS As Recordset
|
||||
|
||||
|
||||
|
||||
Private Sub DataReport_Initialize()
|
||||
Dim strSQL As String
|
||||
|
||||
strSQL = "Select proj_desc from tblProject"
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
' DataReport1.DataSource = oRS
|
||||
End Sub
|
||||
@@ -0,0 +1,139 @@
|
||||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\Windows\system32\stdole2.tlb#OLE Automation
|
||||
Reference=*\G{333C7BC1-460F-11D0-BC04-0080C7055A83}#1.1#0#..\..\Windows\System32\tdc.ocx#Tabular Data Control 1.1 Type Library
|
||||
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\..\Windows\system32\MSBIND.DLL#Microsoft Data Binding Collection
|
||||
Reference=*\G{0A758DFA-C46A-4C1C-8057-C6C18375EE24}#1.0#0#..\..\Windows\system32\tdbg7da.dll#True DBGrid Pro 7.0 Design Assistant
|
||||
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\..\Windows\system32\msstdfmt.dll#Microsoft Data Formatting Object Library
|
||||
Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\..\Windows\system32\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
|
||||
Reference=*\G{8C344710-5FEC-11CF-A0BF-00AA0062BE57}#1.0#0#..\..\Program Files\Common Files\designer\MSCDRUN.DLL#Microsoft Connection Designer Instance 1.0
|
||||
Reference=*\G{EE008642-64A8-11CE-920F-08002B369A33}#2.0#0#..\..\Windows\system32\msrdo20.dll#Microsoft Remote Data Object 2.0
|
||||
Reference=*\G{B4741C00-45A6-11D1-ABEC-00A0C9274B91}#7.0#0#..\..\Program Files\Seagate Software\Report Designer Component\craxdrt.dll#Crystal Report 7 ActiveX Designer Run Time Library
|
||||
Reference=*\G{00000600-0000-0010-8000-00AA006D2EA4}#6.0#0#..\..\Program Files\Common Files\System\ado\msadox.dll#Microsoft ADO Ext. 6.0 for DDL and Security
|
||||
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\Windows\system32\scrrun.dll#Microsoft Scripting Runtime
|
||||
Reference=*\G{00000206-0000-0010-8000-00AA006D2EA4}#2.6#0#..\..\Program Files\Common Files\System\ado\msado26.tlb#Microsoft ActiveX Data Objects 2.6 Library
|
||||
Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#4.0#0#..\..\Windows\system32\msxml4.dll#Microsoft XML, v4.0
|
||||
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
|
||||
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
|
||||
Object={DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0; todg7.ocx
|
||||
Object={00025600-0000-0000-C000-000000000046}#5.2#0; Crystl32.OCX
|
||||
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
|
||||
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
|
||||
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; mscomct2.ocx
|
||||
Object={32B82FD1-3332-11D4-BF7C-E4453F764218}#1.0#0; EasyP.ocx
|
||||
Object={8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0; Flp32a30.ocx
|
||||
Form=frmLotInfo.frm
|
||||
Form=frmMain.frm
|
||||
Form=frmPlans.frm
|
||||
Form=frmViewTake.frm
|
||||
Module=modADO; ADO.bas
|
||||
Form=frmError.frm
|
||||
Form=FrmLabor.FRM
|
||||
Form=frmBlackPaper.FRM
|
||||
Form=frmSupplier.frm
|
||||
Form=frmTexture.frm
|
||||
Form=frmContractor.frm
|
||||
Form=frmScaffold.frm
|
||||
Form=frmPayInput.frm
|
||||
Form=frmPrint.frm
|
||||
Form=frmAbout.frm
|
||||
Form=frmSplash.frm
|
||||
Form=frmLogin.frm
|
||||
Form=frmInvTake.frm
|
||||
Form=frmUser.frm
|
||||
Form=frmOrderDates.frm
|
||||
Form=frmChange.frm
|
||||
Form=frmYardOrder.frm
|
||||
Form=frmYInventory.frm
|
||||
Form=frmShowPO.frm
|
||||
Form=frmScafList.frm
|
||||
Form=frmLotList2.frm
|
||||
Form=frmRepairLot.frm
|
||||
Form=frmShowRepair.frm
|
||||
Form=frmPayroll.frm
|
||||
Form=frmPayHead.frm
|
||||
Form=frmHourList.frm
|
||||
Form=frmLotChLog.frm
|
||||
Form=frmPayList.frm
|
||||
Form=frmReport.frm
|
||||
Form=frmSCrew.frm
|
||||
Form=frmPOList.frm
|
||||
Form=frmInventory.frm
|
||||
Form=frmRepair.frm
|
||||
Form=frmRCrew.frm
|
||||
Form=frmBilling.frm
|
||||
Form=frmBillingStatus.frm
|
||||
Form=frmAR.frm
|
||||
Form=frmFoam.frm
|
||||
Form=frmProjNotes.frm
|
||||
Form=frmAck.frm
|
||||
Form=frmProject.frm
|
||||
Form=frmOrders.frm
|
||||
Form=frmPOInfo.frm
|
||||
Form=frmCrews.frm
|
||||
Form=frmShowYardMat.frm
|
||||
Form=frmShowOrderMat.frm
|
||||
Form=frmJCList.frm
|
||||
Form=frmRepList.frm
|
||||
Form=frmInvPrice.frm
|
||||
Form=frmCrewList.frm
|
||||
Form=frmSand.FRM
|
||||
Form=frmPaySheet.frm
|
||||
Form=frmScafPay.frm
|
||||
Form=frmGetPaySheet.frm
|
||||
Form=frmTake.frm
|
||||
Form=frmTake5.frm
|
||||
Form=frmLotInfo5.frm
|
||||
Form=frmLotPrtJobs.frm
|
||||
Form=frmPaintPrtJobs.frm
|
||||
Form=frmMANBILL.frm
|
||||
Form=frmLotInfoE.frm
|
||||
Form=frmTakeE.frm
|
||||
Form=frmPosPayS.frm
|
||||
Form=frmPosPayV.frm
|
||||
Form=frmAPFix.frm
|
||||
Form=frmARFix.frm
|
||||
Form=frmARMaster.frm
|
||||
Form=frmAPMaster.frm
|
||||
Form=frmProjList.frm
|
||||
Form=frmCertified.frm
|
||||
Form=frmEmployee.frm
|
||||
Form=frmPOWOLot.frm
|
||||
Form=frmWOList.frm
|
||||
Form=frmPosPayC.frm
|
||||
Object={CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0; MSDATGRD.OCX
|
||||
Form=frmCrewsOLD.frm
|
||||
Form=frmInvType.frm
|
||||
IconForm="frmMain"
|
||||
Startup="Sub Main"
|
||||
HelpFile=""
|
||||
Title="ORDERS"
|
||||
ExeName32="Orders11.exe"
|
||||
Command32=""
|
||||
Name="Orders_C"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=20
|
||||
MinorVer=2
|
||||
RevisionVer=11
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="Valley Wide Plastering"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=-1
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
DebugStartupOption=0
|
||||
|
||||
[MS Transaction Server]
|
||||
AutoRefresh=1
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,434 @@
|
||||
VERSION 5.00
|
||||
Object = "{DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0"; "TODG7.OCX"
|
||||
Begin VB.Form frmLabor
|
||||
Caption = "Labor Rates"
|
||||
ClientHeight = 3660
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 11880
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 3660
|
||||
ScaleWidth = 11880
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdCancel
|
||||
Caption = "&Cancel"
|
||||
Height = 555
|
||||
Left = 5250
|
||||
TabIndex = 9
|
||||
Top = 2640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "&Exit"
|
||||
Height = 555
|
||||
Left = 10320
|
||||
TabIndex = 8
|
||||
Top = 2640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "&Add"
|
||||
Height = 555
|
||||
Left = 7785
|
||||
TabIndex = 7
|
||||
Top = 2640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete"
|
||||
Height = 555
|
||||
Left = 2715
|
||||
TabIndex = 6
|
||||
Top = 2640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
Height = 555
|
||||
Left = 180
|
||||
TabIndex = 5
|
||||
Top = 2640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Height = 300
|
||||
Left = 5280
|
||||
Picture = "FRMLABOR.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 4
|
||||
Top = 3300
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Height = 300
|
||||
Left = 5640
|
||||
Picture = "FRMLABOR.frx":0342
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 3
|
||||
Top = 3300
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Height = 300
|
||||
Left = 5985
|
||||
Picture = "FRMLABOR.frx":0684
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 2
|
||||
Top = 3300
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdLast
|
||||
Height = 300
|
||||
Left = 6345
|
||||
Picture = "FRMLABOR.frx":09C6
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 1
|
||||
Top = 3300
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin TrueOleDBGrid70.TDBGrid TDBGLabor
|
||||
Height = 2535
|
||||
Left = 180
|
||||
TabIndex = 0
|
||||
Top = 60
|
||||
Width = 11580
|
||||
_ExtentX = 20426
|
||||
_ExtentY = 4471
|
||||
_LayoutType = 4
|
||||
_RowHeight = -2147483647
|
||||
_WasPersistedAsPixels= 0
|
||||
Columns(0)._VlistStyle= 0
|
||||
Columns(0)._MaxComboItems= 5
|
||||
Columns(0).Caption= "Texture"
|
||||
Columns(0).DataField= "texture"
|
||||
Columns(0).DataWidth= 2
|
||||
Columns(0)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(1)._VlistStyle= 0
|
||||
Columns(1)._MaxComboItems= 5
|
||||
Columns(1).Caption= "Stucco Labor"
|
||||
Columns(1).DataField= "S_Rate"
|
||||
Columns(1).DataWidth= 5
|
||||
Columns(1).DefaultValue= "0"
|
||||
Columns(1).DefaultValue.vt= 8
|
||||
Columns(1).NumberFormat= "Fixed"
|
||||
Columns(1)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(2)._VlistStyle= 0
|
||||
Columns(2)._MaxComboItems= 5
|
||||
Columns(2).Caption= "Lath Labor"
|
||||
Columns(2).DataField= "L_Rate"
|
||||
Columns(2).DataWidth= 5
|
||||
Columns(2).DefaultValue= "0"
|
||||
Columns(2).DefaultValue.vt= 8
|
||||
Columns(2).NumberFormat= "Fixed"
|
||||
Columns(2)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(3)._VlistStyle= 0
|
||||
Columns(3)._MaxComboItems= 5
|
||||
Columns(3).Caption= "Metal Labor"
|
||||
Columns(3).DataField= "M_Rate"
|
||||
Columns(3).DataWidth= 5
|
||||
Columns(3).DefaultValue= "0"
|
||||
Columns(3).DefaultValue.vt= 8
|
||||
Columns(3).NumberFormat= "Fixed"
|
||||
Columns(3)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(4)._VlistStyle= 0
|
||||
Columns(4)._MaxComboItems= 5
|
||||
Columns(4).Caption= "CMU Rate"
|
||||
Columns(4).DataField= "CMU"
|
||||
Columns(4).DataWidth= 5
|
||||
Columns(4).DefaultValue= "0"
|
||||
Columns(4).DefaultValue.vt= 8
|
||||
Columns(4).NumberFormat= "Fixed"
|
||||
Columns(4)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(5)._VlistStyle= 0
|
||||
Columns(5)._MaxComboItems= 5
|
||||
Columns(5).Caption= "Mat. MarkUp"
|
||||
Columns(5).DataField= "matmu"
|
||||
Columns(5).DataWidth= 5
|
||||
Columns(5).DefaultValue= "0"
|
||||
Columns(5).DefaultValue.vt= 8
|
||||
Columns(5).NumberFormat= "Percent"
|
||||
Columns(5)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(6)._VlistStyle= 0
|
||||
Columns(6)._MaxComboItems= 5
|
||||
Columns(6).Caption= "Scaffold"
|
||||
Columns(6).DataField= "scr"
|
||||
Columns(6).DataWidth= 5
|
||||
Columns(6).DefaultValue= "0"
|
||||
Columns(6).DefaultValue.vt= 8
|
||||
Columns(6).NumberFormat= "Fixed"
|
||||
Columns(6)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(7)._VlistStyle= 0
|
||||
Columns(7)._MaxComboItems= 5
|
||||
Columns(7).Caption= "OH Percent"
|
||||
Columns(7).DataField= "ohp"
|
||||
Columns(7).DataWidth= 5
|
||||
Columns(7).DefaultValue= "0"
|
||||
Columns(7).DefaultValue.vt= 8
|
||||
Columns(7).NumberFormat= "Fixed"
|
||||
Columns(7)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(8)._VlistStyle= 0
|
||||
Columns(8)._MaxComboItems= 5
|
||||
Columns(8).Caption= "Tape/Plastic"
|
||||
Columns(8).DataField= "tp"
|
||||
Columns(8).DataWidth= 5
|
||||
Columns(8).DefaultValue= "0"
|
||||
Columns(8).DefaultValue.vt= 8
|
||||
Columns(8).NumberFormat= "Fixed"
|
||||
Columns(8)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(9)._VlistStyle= 0
|
||||
Columns(9)._MaxComboItems= 5
|
||||
Columns(9).Caption= "MarkUp"
|
||||
Columns(9).DataField= "mu"
|
||||
Columns(9).DataWidth= 5
|
||||
Columns(9).DefaultValue= "0"
|
||||
Columns(9).DefaultValue.vt= 8
|
||||
Columns(9).NumberFormat= "Percent"
|
||||
Columns(9)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(10)._VlistStyle= 0
|
||||
Columns(10)._MaxComboItems= 5
|
||||
Columns(10).Caption= "Cmnt/Lime Adj."
|
||||
Columns(10).DataField= "cladj"
|
||||
Columns(10).DataWidth= 2
|
||||
Columns(10).DefaultValue= "0"
|
||||
Columns(10).DefaultValue.vt= 8
|
||||
Columns(10).NumberFormat= "Fixed"
|
||||
Columns(10)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns.Count = 11
|
||||
Splits(0)._UserFlags= 0
|
||||
Splits(0).RecordSelectorWidth= 503
|
||||
Splits(0)._SavedRecordSelectors= 0 'False
|
||||
Splits(0).DividerColor= 12632256
|
||||
Splits(0).SpringMode= 0 'False
|
||||
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
|
||||
Splits(0)._ColumnProps(0)= "Columns.Count=11"
|
||||
Splits(0)._ColumnProps(1)= "Column(0).Width=1958"
|
||||
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
|
||||
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=1879"
|
||||
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
|
||||
Splits(0)._ColumnProps(5)= "Column(1).Width=1958"
|
||||
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
|
||||
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=1879"
|
||||
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
|
||||
Splits(0)._ColumnProps(9)= "Column(2).Width=1667"
|
||||
Splits(0)._ColumnProps(10)= "Column(2).DividerColor=0"
|
||||
Splits(0)._ColumnProps(11)= "Column(2)._WidthInPix=1588"
|
||||
Splits(0)._ColumnProps(12)= "Column(2).Order=3"
|
||||
Splits(0)._ColumnProps(13)= "Column(3).Width=1799"
|
||||
Splits(0)._ColumnProps(14)= "Column(3).DividerColor=0"
|
||||
Splits(0)._ColumnProps(15)= "Column(3)._WidthInPix=1720"
|
||||
Splits(0)._ColumnProps(16)= "Column(3).Order=4"
|
||||
Splits(0)._ColumnProps(17)= "Column(4).Width=1799"
|
||||
Splits(0)._ColumnProps(18)= "Column(4).DividerColor=0"
|
||||
Splits(0)._ColumnProps(19)= "Column(4)._WidthInPix=1720"
|
||||
Splits(0)._ColumnProps(20)= "Column(4).Order=5"
|
||||
Splits(0)._ColumnProps(21)= "Column(5).Width=1931"
|
||||
Splits(0)._ColumnProps(22)= "Column(5).DividerColor=0"
|
||||
Splits(0)._ColumnProps(23)= "Column(5)._WidthInPix=1852"
|
||||
Splits(0)._ColumnProps(24)= "Column(5).Order=6"
|
||||
Splits(0)._ColumnProps(25)= "Column(6).Width=1402"
|
||||
Splits(0)._ColumnProps(26)= "Column(6).DividerColor=0"
|
||||
Splits(0)._ColumnProps(27)= "Column(6)._WidthInPix=1323"
|
||||
Splits(0)._ColumnProps(28)= "Column(6).Order=7"
|
||||
Splits(0)._ColumnProps(29)= "Column(7).Width=1931"
|
||||
Splits(0)._ColumnProps(30)= "Column(7).DividerColor=0"
|
||||
Splits(0)._ColumnProps(31)= "Column(7)._WidthInPix=1852"
|
||||
Splits(0)._ColumnProps(32)= "Column(7).Order=8"
|
||||
Splits(0)._ColumnProps(33)= "Column(8).Width=1931"
|
||||
Splits(0)._ColumnProps(34)= "Column(8).DividerColor=0"
|
||||
Splits(0)._ColumnProps(35)= "Column(8)._WidthInPix=1852"
|
||||
Splits(0)._ColumnProps(36)= "Column(8).Order=9"
|
||||
Splits(0)._ColumnProps(37)= "Column(9).Width=1402"
|
||||
Splits(0)._ColumnProps(38)= "Column(9).DividerColor=0"
|
||||
Splits(0)._ColumnProps(39)= "Column(9)._WidthInPix=1323"
|
||||
Splits(0)._ColumnProps(40)= "Column(9).Order=10"
|
||||
Splits(0)._ColumnProps(41)= "Column(10).Width=2064"
|
||||
Splits(0)._ColumnProps(42)= "Column(10).DividerColor=0"
|
||||
Splits(0)._ColumnProps(43)= "Column(10)._WidthInPix=1984"
|
||||
Splits(0)._ColumnProps(44)= "Column(10).Order=11"
|
||||
Splits.Count = 1
|
||||
PrintInfos(0)._StateFlags= 0
|
||||
PrintInfos(0).Name= "piInternal 0"
|
||||
PrintInfos(0).PageHeaderFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageFooterFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageHeaderHeight= 0
|
||||
PrintInfos(0).PageFooterHeight= 0
|
||||
PrintInfos.Count= 1
|
||||
AllowDelete = -1 'True
|
||||
AllowAddNew = -1 'True
|
||||
DefColWidth = 0
|
||||
HeadLines = 1
|
||||
FootLines = 1
|
||||
MultipleLines = 0
|
||||
CellTipsWidth = 0
|
||||
DeadAreaBackColor= 12632256
|
||||
RowDividerColor = 12632256
|
||||
RowSubDividerColor= 12632256
|
||||
DirectionAfterEnter= 1
|
||||
MaxRows = 250000
|
||||
ViewColumnCaptionWidth= 0
|
||||
ViewColumnWidth = 0
|
||||
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
|
||||
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
|
||||
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
|
||||
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
|
||||
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=825,.italic=0"
|
||||
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(5) = ":id=0,.fontname=MS Sans Serif"
|
||||
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
|
||||
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
|
||||
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34"
|
||||
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
|
||||
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
|
||||
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
|
||||
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
|
||||
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
|
||||
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
|
||||
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
|
||||
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
|
||||
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
|
||||
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
|
||||
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
|
||||
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
|
||||
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
|
||||
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
|
||||
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
|
||||
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
|
||||
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
|
||||
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
|
||||
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
|
||||
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
|
||||
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=28,.parent=13"
|
||||
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=25,.parent=14"
|
||||
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=26,.parent=15"
|
||||
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=27,.parent=17"
|
||||
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=32,.parent=13"
|
||||
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=29,.parent=14"
|
||||
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=30,.parent=15"
|
||||
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=31,.parent=17"
|
||||
_StyleDefs(38) = "Splits(0).Columns(2).Style:id=46,.parent=13"
|
||||
_StyleDefs(39) = "Splits(0).Columns(2).HeadingStyle:id=43,.parent=14"
|
||||
_StyleDefs(40) = "Splits(0).Columns(2).FooterStyle:id=44,.parent=15"
|
||||
_StyleDefs(41) = "Splits(0).Columns(2).EditorStyle:id=45,.parent=17"
|
||||
_StyleDefs(42) = "Splits(0).Columns(3).Style:id=50,.parent=13"
|
||||
_StyleDefs(43) = "Splits(0).Columns(3).HeadingStyle:id=47,.parent=14"
|
||||
_StyleDefs(44) = "Splits(0).Columns(3).FooterStyle:id=48,.parent=15"
|
||||
_StyleDefs(45) = "Splits(0).Columns(3).EditorStyle:id=49,.parent=17"
|
||||
_StyleDefs(46) = "Splits(0).Columns(4).Style:id=54,.parent=13"
|
||||
_StyleDefs(47) = "Splits(0).Columns(4).HeadingStyle:id=51,.parent=14"
|
||||
_StyleDefs(48) = "Splits(0).Columns(4).FooterStyle:id=52,.parent=15"
|
||||
_StyleDefs(49) = "Splits(0).Columns(4).EditorStyle:id=53,.parent=17"
|
||||
_StyleDefs(50) = "Splits(0).Columns(5).Style:id=58,.parent=13"
|
||||
_StyleDefs(51) = "Splits(0).Columns(5).HeadingStyle:id=55,.parent=14"
|
||||
_StyleDefs(52) = "Splits(0).Columns(5).FooterStyle:id=56,.parent=15"
|
||||
_StyleDefs(53) = "Splits(0).Columns(5).EditorStyle:id=57,.parent=17"
|
||||
_StyleDefs(54) = "Splits(0).Columns(6).Style:id=62,.parent=13"
|
||||
_StyleDefs(55) = "Splits(0).Columns(6).HeadingStyle:id=59,.parent=14"
|
||||
_StyleDefs(56) = "Splits(0).Columns(6).FooterStyle:id=60,.parent=15"
|
||||
_StyleDefs(57) = "Splits(0).Columns(6).EditorStyle:id=61,.parent=17"
|
||||
_StyleDefs(58) = "Splits(0).Columns(7).Style:id=66,.parent=13"
|
||||
_StyleDefs(59) = "Splits(0).Columns(7).HeadingStyle:id=63,.parent=14"
|
||||
_StyleDefs(60) = "Splits(0).Columns(7).FooterStyle:id=64,.parent=15"
|
||||
_StyleDefs(61) = "Splits(0).Columns(7).EditorStyle:id=65,.parent=17"
|
||||
_StyleDefs(62) = "Splits(0).Columns(8).Style:id=70,.parent=13"
|
||||
_StyleDefs(63) = "Splits(0).Columns(8).HeadingStyle:id=67,.parent=14"
|
||||
_StyleDefs(64) = "Splits(0).Columns(8).FooterStyle:id=68,.parent=15"
|
||||
_StyleDefs(65) = "Splits(0).Columns(8).EditorStyle:id=69,.parent=17"
|
||||
_StyleDefs(66) = "Splits(0).Columns(9).Style:id=74,.parent=13"
|
||||
_StyleDefs(67) = "Splits(0).Columns(9).HeadingStyle:id=71,.parent=14"
|
||||
_StyleDefs(68) = "Splits(0).Columns(9).FooterStyle:id=72,.parent=15"
|
||||
_StyleDefs(69) = "Splits(0).Columns(9).EditorStyle:id=73,.parent=17"
|
||||
_StyleDefs(70) = "Splits(0).Columns(10).Style:id=78,.parent=13"
|
||||
_StyleDefs(71) = "Splits(0).Columns(10).HeadingStyle:id=75,.parent=14"
|
||||
_StyleDefs(72) = "Splits(0).Columns(10).FooterStyle:id=76,.parent=15"
|
||||
_StyleDefs(73) = "Splits(0).Columns(10).EditorStyle:id=77,.parent=17"
|
||||
_StyleDefs(74) = "Named:id=33:Normal"
|
||||
_StyleDefs(75) = ":id=33,.parent=0"
|
||||
_StyleDefs(76) = "Named:id=34:Heading"
|
||||
_StyleDefs(77) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(78) = ":id=34,.wraptext=-1"
|
||||
_StyleDefs(79) = "Named:id=35:Footing"
|
||||
_StyleDefs(80) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(81) = "Named:id=36:Selected"
|
||||
_StyleDefs(82) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(83) = "Named:id=37:Caption"
|
||||
_StyleDefs(84) = ":id=37,.parent=34,.alignment=2"
|
||||
_StyleDefs(85) = "Named:id=38:HighlightRow"
|
||||
_StyleDefs(86) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(87) = "Named:id=39:EvenRow"
|
||||
_StyleDefs(88) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
|
||||
_StyleDefs(89) = "Named:id=40:OddRow"
|
||||
_StyleDefs(90) = ":id=40,.parent=33"
|
||||
_StyleDefs(91) = "Named:id=41:RecordSelector"
|
||||
_StyleDefs(92) = ":id=41,.parent=34"
|
||||
_StyleDefs(93) = "Named:id=42:FilterBar"
|
||||
_StyleDefs(94) = ":id=42,.parent=33"
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmLabor"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRS As Recordset
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
moRS.AddNew
|
||||
TDBGLabor.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub cmdCancel_Click()
|
||||
moRS.CancelUpdate
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
moRS.Delete
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
moRS.MoveFirst
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
moRS.MoveLast
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
moRS.MoveNext
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
moRS.MovePrevious
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
moRS.Update
|
||||
TDBGLabor.ReBind
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call LoadLabor
|
||||
TDBGLabor.DataSource = moRS
|
||||
TDBGLabor.ReBind
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadLabor()
|
||||
Dim strSQL As String
|
||||
|
||||
strSQL = "SELECT * FROM tblPrgInfo"
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,284 @@
|
||||
VERSION 5.00
|
||||
Object = "{DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0"; "TODG7.OCX"
|
||||
Begin VB.Form frmRCrew
|
||||
Caption = "Repair Crew"
|
||||
ClientHeight = 6420
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 9060
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 6420
|
||||
ScaleWidth = 9060
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "Exit"
|
||||
Height = 555
|
||||
Left = 7560
|
||||
TabIndex = 8
|
||||
Top = 5760
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
Height = 555
|
||||
Left = 5400
|
||||
TabIndex = 7
|
||||
Top = 5760
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
Height = 555
|
||||
Left = 2280
|
||||
TabIndex = 6
|
||||
Top = 5760
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
Height = 555
|
||||
Left = 120
|
||||
TabIndex = 5
|
||||
Top = 5760
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Height = 300
|
||||
Left = 3840
|
||||
Picture = "FRMLABOR1.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 4
|
||||
Top = 5880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Height = 300
|
||||
Left = 4200
|
||||
Picture = "FRMLABOR1.frx":0342
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 3
|
||||
Top = 5880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Height = 300
|
||||
Left = 4545
|
||||
Picture = "FRMLABOR1.frx":0684
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 2
|
||||
Top = 5880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdLast
|
||||
Height = 300
|
||||
Left = 4905
|
||||
Picture = "FRMLABOR1.frx":09C6
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 1
|
||||
Top = 5880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin TrueOleDBGrid70.TDBGrid TDBGLabor
|
||||
Height = 5535
|
||||
Left = -60
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 8940
|
||||
_ExtentX = 15769
|
||||
_ExtentY = 9763
|
||||
_LayoutType = 4
|
||||
_RowHeight = -2147483647
|
||||
_WasPersistedAsPixels= 0
|
||||
Columns(0)._VlistStyle= 0
|
||||
Columns(0)._MaxComboItems= 5
|
||||
Columns(0).Caption= "Repair Person"
|
||||
Columns(0).DataField= "Name"
|
||||
Columns(0).DataWidth= 25
|
||||
Columns(0)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(1)._VlistStyle= 0
|
||||
Columns(1)._MaxComboItems= 5
|
||||
Columns(1).Caption= "Phone Number"
|
||||
Columns(1).DataField= "Phone"
|
||||
Columns(1).DataWidth= 12
|
||||
Columns(1).EditMask= "(###) ###-####"
|
||||
Columns(1).EditMaskUpdate= -1 'True
|
||||
Columns(1).EditMaskRight= -1 'True
|
||||
Columns(1)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(2)._VlistStyle= 0
|
||||
Columns(2)._MaxComboItems= 5
|
||||
Columns(2).Caption= "Radio ID"
|
||||
Columns(2).DataField= "Radio"
|
||||
Columns(2).DataWidth= 10
|
||||
Columns(2)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns.Count = 3
|
||||
Splits(0)._UserFlags= 0
|
||||
Splits(0).RecordSelectorWidth= 503
|
||||
Splits(0)._SavedRecordSelectors= 0 'False
|
||||
Splits(0).DividerColor= 12632256
|
||||
Splits(0).SpringMode= 0 'False
|
||||
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
|
||||
Splits(0)._ColumnProps(0)= "Columns.Count=3"
|
||||
Splits(0)._ColumnProps(1)= "Column(0).Width=7646"
|
||||
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
|
||||
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=7567"
|
||||
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
|
||||
Splits(0)._ColumnProps(5)= "Column(1).Width=3731"
|
||||
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
|
||||
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=3651"
|
||||
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
|
||||
Splits(0)._ColumnProps(9)= "Column(2).Width=3387"
|
||||
Splits(0)._ColumnProps(10)= "Column(2).DividerColor=0"
|
||||
Splits(0)._ColumnProps(11)= "Column(2)._WidthInPix=3307"
|
||||
Splits(0)._ColumnProps(12)= "Column(2).Order=3"
|
||||
Splits.Count = 1
|
||||
PrintInfos(0)._StateFlags= 0
|
||||
PrintInfos(0).Name= "piInternal 0"
|
||||
PrintInfos(0).PageHeaderFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageFooterFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageHeaderHeight= 0
|
||||
PrintInfos(0).PageFooterHeight= 0
|
||||
PrintInfos.Count= 1
|
||||
AllowDelete = -1 'True
|
||||
AllowAddNew = -1 'True
|
||||
DefColWidth = 0
|
||||
HeadLines = 1
|
||||
FootLines = 1
|
||||
MultipleLines = 0
|
||||
CellTipsWidth = 0
|
||||
DeadAreaBackColor= 12632256
|
||||
RowDividerColor = 12632256
|
||||
RowSubDividerColor= 12632256
|
||||
DirectionAfterEnter= 1
|
||||
MaxRows = 250000
|
||||
ViewColumnCaptionWidth= 0
|
||||
ViewColumnWidth = 0
|
||||
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
|
||||
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
|
||||
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
|
||||
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
|
||||
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=825,.italic=0"
|
||||
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(5) = ":id=0,.fontname=MS Sans Serif"
|
||||
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
|
||||
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
|
||||
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34"
|
||||
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
|
||||
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
|
||||
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
|
||||
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
|
||||
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
|
||||
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
|
||||
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
|
||||
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
|
||||
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
|
||||
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
|
||||
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
|
||||
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
|
||||
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
|
||||
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
|
||||
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
|
||||
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
|
||||
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
|
||||
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
|
||||
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
|
||||
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
|
||||
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=28,.parent=13"
|
||||
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=25,.parent=14"
|
||||
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=26,.parent=15"
|
||||
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=27,.parent=17"
|
||||
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=32,.parent=13"
|
||||
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=29,.parent=14"
|
||||
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=30,.parent=15"
|
||||
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=31,.parent=17"
|
||||
_StyleDefs(38) = "Splits(0).Columns(2).Style:id=46,.parent=13"
|
||||
_StyleDefs(39) = "Splits(0).Columns(2).HeadingStyle:id=43,.parent=14"
|
||||
_StyleDefs(40) = "Splits(0).Columns(2).FooterStyle:id=44,.parent=15"
|
||||
_StyleDefs(41) = "Splits(0).Columns(2).EditorStyle:id=45,.parent=17"
|
||||
_StyleDefs(42) = "Named:id=33:Normal"
|
||||
_StyleDefs(43) = ":id=33,.parent=0"
|
||||
_StyleDefs(44) = "Named:id=34:Heading"
|
||||
_StyleDefs(45) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(46) = ":id=34,.wraptext=-1,.bold=-1,.fontsize=975,.italic=0,.underline=0"
|
||||
_StyleDefs(47) = ":id=34,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(48) = ":id=34,.fontname=MS Sans Serif"
|
||||
_StyleDefs(49) = "Named:id=35:Footing"
|
||||
_StyleDefs(50) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(51) = "Named:id=36:Selected"
|
||||
_StyleDefs(52) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(53) = "Named:id=37:Caption"
|
||||
_StyleDefs(54) = ":id=37,.parent=34,.alignment=2"
|
||||
_StyleDefs(55) = "Named:id=38:HighlightRow"
|
||||
_StyleDefs(56) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(57) = "Named:id=39:EvenRow"
|
||||
_StyleDefs(58) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
|
||||
_StyleDefs(59) = "Named:id=40:OddRow"
|
||||
_StyleDefs(60) = ":id=40,.parent=33"
|
||||
_StyleDefs(61) = "Named:id=41:RecordSelector"
|
||||
_StyleDefs(62) = ":id=41,.parent=34"
|
||||
_StyleDefs(63) = "Named:id=42:FilterBar"
|
||||
_StyleDefs(64) = ":id=42,.parent=33"
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmRCrew"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRS As Recordset
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
moRS.AddNew
|
||||
TDBGLabor.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
moRS.Delete
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
moRS.MoveFirst
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
moRS.MoveLast
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
moRS.MoveNext
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
moRS.MovePrevious
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
moRS.Update
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call LoadLabor
|
||||
TDBGLabor.DataSource = moRS
|
||||
TDBGLabor.ReBind
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadLabor()
|
||||
Dim strSQL As String
|
||||
|
||||
strSQL = "SELECT * FROM tblRCrew ORDER by RC_ID"
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,99 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmLogin1
|
||||
BorderStyle = 3 'Fixed Dialog
|
||||
Caption = "Login"
|
||||
ClientHeight = 1545
|
||||
ClientLeft = 2835
|
||||
ClientTop = 3480
|
||||
ClientWidth = 3750
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
MinButton = 0 'False
|
||||
ScaleHeight = 912.837
|
||||
ScaleMode = 0 'User
|
||||
ScaleWidth = 3521.047
|
||||
ShowInTaskbar = 0 'False
|
||||
StartUpPosition = 2 'CenterScreen
|
||||
Begin VB.TextBox txtUserName
|
||||
Height = 345
|
||||
Left = 1290
|
||||
TabIndex = 1
|
||||
Top = 135
|
||||
Width = 2325
|
||||
End
|
||||
Begin VB.CommandButton cmdOK
|
||||
Caption = "OK"
|
||||
Default = -1 'True
|
||||
Height = 390
|
||||
Left = 495
|
||||
TabIndex = 4
|
||||
Top = 1020
|
||||
Width = 1140
|
||||
End
|
||||
Begin VB.CommandButton cmdCancel
|
||||
Cancel = -1 'True
|
||||
Caption = "Cancel"
|
||||
Height = 390
|
||||
Left = 2100
|
||||
TabIndex = 5
|
||||
Top = 1020
|
||||
Width = 1140
|
||||
End
|
||||
Begin VB.TextBox txtPassword
|
||||
Height = 345
|
||||
IMEMode = 3 'DISABLE
|
||||
Left = 1290
|
||||
PasswordChar = "*"
|
||||
TabIndex = 3
|
||||
Top = 525
|
||||
Width = 2325
|
||||
End
|
||||
Begin VB.Label lblLabels
|
||||
Caption = "&User Name:"
|
||||
Height = 270
|
||||
Index = 0
|
||||
Left = 105
|
||||
TabIndex = 0
|
||||
Top = 150
|
||||
Width = 1080
|
||||
End
|
||||
Begin VB.Label lblLabels
|
||||
Caption = "&Password:"
|
||||
Height = 270
|
||||
Index = 1
|
||||
Left = 105
|
||||
TabIndex = 2
|
||||
Top = 540
|
||||
Width = 1080
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmLogin1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Public gboolLoginSucceeded As Boolean
|
||||
|
||||
Private Sub cmdCancel_Click()
|
||||
'set the global var to false
|
||||
'to denote a failed login
|
||||
gboolLoginSucceeded = False
|
||||
Me.Hide
|
||||
End Sub
|
||||
|
||||
Private Sub cmdOK_Click()
|
||||
'check for correct password
|
||||
If txtPassword = "password" Then
|
||||
'place code to here to pass the
|
||||
'success to the calling sub
|
||||
'setting a global var is the easiest
|
||||
gboolLoginSucceeded = True
|
||||
Me.Hide
|
||||
Else
|
||||
MsgBox "Invalid Password, try again!", , "Login"
|
||||
txtPassword.SetFocus
|
||||
SendKeys "{Home}+{End}"
|
||||
End If
|
||||
End Sub
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmUser1
|
||||
Caption = "User Information"
|
||||
ClientHeight = 5655
|
||||
ClientLeft = 60
|
||||
ClientTop = 405
|
||||
ClientWidth = 7230
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5655
|
||||
ScaleWidth = 7230
|
||||
StartUpPosition = 3 'Windows Default
|
||||
End
|
||||
Attribute VB_Name = "frmUser1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
VERSION 5.00
|
||||
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
|
||||
Begin VB.Form frmFlexGrid
|
||||
Caption = "The Flex Grid Control"
|
||||
ClientHeight = 4215
|
||||
ClientLeft = 45
|
||||
ClientTop = 510
|
||||
ClientWidth = 8010
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4215
|
||||
ScaleWidth = 8010
|
||||
Begin VB.CommandButton cmdDown
|
||||
Height = 495
|
||||
Left = 7500
|
||||
Picture = "FlexGrid.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 8
|
||||
Top = 1500
|
||||
Width = 435
|
||||
End
|
||||
Begin VB.CommandButton cmdUp
|
||||
Height = 495
|
||||
Left = 7500
|
||||
Picture = "FlexGrid.frx":0442
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 7
|
||||
Top = 960
|
||||
Width = 435
|
||||
End
|
||||
Begin VB.CommandButton cmdClip
|
||||
Caption = "Clip Example"
|
||||
Height = 912
|
||||
Left = 6660
|
||||
TabIndex = 6
|
||||
Top = 3240
|
||||
Width = 1272
|
||||
End
|
||||
Begin MSFlexGridLib.MSFlexGrid grdEmps
|
||||
Height = 3072
|
||||
Left = 60
|
||||
TabIndex = 5
|
||||
Top = 60
|
||||
Width = 7332
|
||||
_ExtentX = 12938
|
||||
_ExtentY = 5424
|
||||
_Version = 393216
|
||||
SelectionMode = 1
|
||||
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
|
||||
End
|
||||
Begin VB.CommandButton cmdColumn2
|
||||
Caption = "Retrieve Column 2"
|
||||
Height = 912
|
||||
Left = 5340
|
||||
TabIndex = 4
|
||||
Top = 3240
|
||||
Width = 1272
|
||||
End
|
||||
Begin VB.CommandButton cmdColumn1
|
||||
Caption = "Retrieve Column 1"
|
||||
Height = 912
|
||||
Left = 4020
|
||||
TabIndex = 3
|
||||
Top = 3240
|
||||
Width = 1272
|
||||
End
|
||||
Begin VB.CommandButton cmdDataLoad
|
||||
Caption = "Load Data From Table"
|
||||
Height = 912
|
||||
Left = 2700
|
||||
TabIndex = 2
|
||||
Top = 3240
|
||||
Width = 1272
|
||||
End
|
||||
Begin VB.CommandButton cmdLoad
|
||||
Caption = "Load Data"
|
||||
Height = 912
|
||||
Left = 1380
|
||||
TabIndex = 1
|
||||
Top = 3240
|
||||
Width = 1272
|
||||
End
|
||||
Begin VB.CommandButton cmdInit
|
||||
Caption = "Initialize Grid"
|
||||
Height = 912
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 3240
|
||||
Width = 1272
|
||||
End
|
||||
Begin VB.Image imgCheck
|
||||
Height = 144
|
||||
Left = 7500
|
||||
Picture = "FlexGrid.frx":0884
|
||||
Stretch = -1 'True
|
||||
Top = 180
|
||||
Visible = 0 'False
|
||||
Width = 144
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmFlexGrid"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Dim mlngColPos As Long
|
||||
|
||||
Const COL_ID As Integer = 0
|
||||
Const COL_TYPE As Integer = 1
|
||||
Const COL_NAME As Integer = 2
|
||||
Const COL_START As Integer = 3
|
||||
Const COL_SALARY As Integer = 4
|
||||
Const COL_ACTIVE As Integer = 5
|
||||
|
||||
Private Sub cmdClip_Click()
|
||||
MsgBox grdEmps.Clip
|
||||
End Sub
|
||||
|
||||
Private Sub cmdColumn1_Click()
|
||||
grdEmps.Col = COL_NAME
|
||||
MsgBox "The Employee's Name is " & grdEmps.Text
|
||||
End Sub
|
||||
|
||||
Private Sub cmdColumn2_Click()
|
||||
MsgBox "The Employee's Name is " & grdEmps.TextMatrix(grdEmps.Row, COL_NAME)
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDataLoad_Click()
|
||||
Call GridInit
|
||||
|
||||
Call GridDataLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDown_Click()
|
||||
Dim intRow As Integer
|
||||
|
||||
intRow = grdEmps.Row
|
||||
|
||||
If intRow < grdEmps.Rows - 1 Then
|
||||
grdEmps.RowPosition(intRow) = intRow + 1
|
||||
grdEmps.Row = intRow + 1
|
||||
If Not grdEmps.RowIsVisible(grdEmps.Row) Then
|
||||
grdEmps.TopRow = grdEmps.Row
|
||||
End If
|
||||
grdEmps.Col = COL_ID
|
||||
grdEmps.ColSel = COL_ACTIVE
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdInit_Click()
|
||||
Call GridInit
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLoad_Click()
|
||||
Call GridInit
|
||||
|
||||
Call GridLoad
|
||||
End Sub
|
||||
|
||||
Private Sub GridInit()
|
||||
With grdEmps
|
||||
' Get rid of any fixed rows and columns
|
||||
.FixedRows = 0
|
||||
.FixedCols = 0
|
||||
|
||||
' Clear the Grid
|
||||
.Clear
|
||||
|
||||
' Set the initial number of rows and columns
|
||||
.Rows = 1
|
||||
.Cols = 6
|
||||
|
||||
' Setup Headers
|
||||
Call GridHeader
|
||||
|
||||
' Set Column Widths
|
||||
.ColWidth(COL_ID) = 0
|
||||
.ColWidth(COL_TYPE) = 2000
|
||||
.ColWidth(COL_NAME) = 2000
|
||||
.ColWidth(COL_START) = 1000
|
||||
.ColWidth(COL_SALARY) = 1000
|
||||
.ColWidth(COL_ACTIVE) = 800
|
||||
|
||||
' Set Column Alignments
|
||||
.ColAlignment(COL_START) = flexAlignCenterCenter
|
||||
.ColAlignment(COL_SALARY) = flexAlignRightCenter
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub GridHeader()
|
||||
With grdEmps
|
||||
.Row = 0
|
||||
.Col = COL_ID
|
||||
.Text = "Emp ID"
|
||||
|
||||
.Col = COL_TYPE
|
||||
.Text = "Type"
|
||||
|
||||
.Col = COL_NAME
|
||||
.Text = "Name"
|
||||
|
||||
.Col = COL_START
|
||||
.Text = "Start Date"
|
||||
|
||||
.Col = COL_SALARY
|
||||
.Text = "Salary"
|
||||
|
||||
.Col = COL_ACTIVE
|
||||
.Text = "Active"
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub GridLoad()
|
||||
With grdEmps
|
||||
' Add a row
|
||||
.AddItem "1" & vbTab & _
|
||||
"Manager" & vbTab & _
|
||||
"Sheriff, Paul" & vbTab & _
|
||||
"3/1/91" & vbTab & _
|
||||
Format$("70000", "Currency")
|
||||
.Row = 1
|
||||
.Col = COL_ACTIVE
|
||||
Set .CellPicture = imgCheck.Picture
|
||||
.CellFontBold = False
|
||||
.CellPictureAlignment = flexAlignCenterCenter
|
||||
|
||||
' Set the fixed rows
|
||||
.FixedRows = 1
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub GridDataLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
Dim strLine As String
|
||||
|
||||
' Build the SQL String
|
||||
strSQL = "SELECT lEmp_id, "
|
||||
strSQL = strSQL & "szLast_nm, "
|
||||
strSQL = strSQL & "sFirst_nm, "
|
||||
strSQL = strSQL & "szEmployee_type, "
|
||||
strSQL = strSQL & "dtStart_dt, "
|
||||
strSQL = strSQL & "cSalary_amt, "
|
||||
strSQL = strSQL & "boolActive_fl "
|
||||
strSQL = strSQL & "FROM tblEmployees, tblEmpTypes "
|
||||
strSQL = strSQL & "WHERE tblEmployees.lEmpType_id = tblEmpTypes.lEmpType_id "
|
||||
strSQL = strSQL & "ORDER BY szEmployee_type "
|
||||
|
||||
' Open the Database
|
||||
Call DataOpen
|
||||
' Open the Recordset
|
||||
Set oRS = gdb.OpenRecordset(strSQL)
|
||||
|
||||
' Set this to speed up loading
|
||||
grdEmps.Redraw = False
|
||||
|
||||
' Set these for Merging of Cells
|
||||
'grdEmps.MergeCells = flexMergeRestrictColumns
|
||||
'grdEmps.MergeCol(COL_TYPE) = True
|
||||
|
||||
|
||||
' Loop through each record
|
||||
Do Until oRS.EOF
|
||||
' Build string to put into grid
|
||||
' Separate each column with tabs
|
||||
strLine = oRS!lEmp_id & vbTab & _
|
||||
oRS!szEmployee_type & "" & vbTab & _
|
||||
oRS!szLast_nm & ", " & oRS!sFirst_nm & vbTab & _
|
||||
oRS!dtStart_dt & vbTab & _
|
||||
Format$(oRS!cSalary_amt, "Currency")
|
||||
|
||||
' Add the row to the grid
|
||||
grdEmps.AddItem strLine
|
||||
If Field2Bool(oRS!boolActive_fl) Then
|
||||
grdEmps.Row = grdEmps.Rows - 1
|
||||
grdEmps.Col = COL_ACTIVE
|
||||
Call PictureSet
|
||||
End If
|
||||
|
||||
' Move to the next record
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
' Set the Fixed Rows if Grid has data
|
||||
If grdEmps.Rows > 1 Then
|
||||
grdEmps.FixedRows = 1
|
||||
End If
|
||||
|
||||
' Now redraw the grid
|
||||
grdEmps.Redraw = True
|
||||
|
||||
' Close the Recordset and Database
|
||||
oRS.Close
|
||||
gdb.Close
|
||||
End Sub
|
||||
|
||||
Private Sub cmdUp_Click()
|
||||
Dim intRow As Integer
|
||||
|
||||
intRow = grdEmps.Row
|
||||
|
||||
If intRow > 1 Then
|
||||
grdEmps.RowPosition(intRow) = intRow - 1
|
||||
grdEmps.Row = intRow - 1
|
||||
If Not grdEmps.RowIsVisible(grdEmps.Row) Then
|
||||
grdEmps.TopRow = grdEmps.Row
|
||||
End If
|
||||
grdEmps.Col = COL_ID
|
||||
grdEmps.ColSel = COL_ACTIVE
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub grdEmps_DblClick()
|
||||
If mlngColPos >= grdEmps.ColPos(COL_ACTIVE) And mlngColPos < grdEmps.Width Then
|
||||
grdEmps.Col = COL_ACTIVE
|
||||
If grdEmps.CellPicture = 0 Then
|
||||
Call PictureSet
|
||||
Else
|
||||
Set grdEmps.CellPicture = Nothing
|
||||
End If
|
||||
grdEmps.Col = COL_ID
|
||||
grdEmps.ColSel = COL_ACTIVE
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub grdEmps_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
|
||||
If Button = vbLeftButton Then
|
||||
mlngColPos = x
|
||||
If y >= grdEmps.RowPos(0) And y < grdEmps.RowPos(1) Then
|
||||
If x >= grdEmps.ColPos(COL_TYPE) And x < grdEmps.ColPos(COL_NAME) Then
|
||||
grdEmps.Col = COL_TYPE
|
||||
grdEmps.Sort = flexSortStringNoCaseAscending
|
||||
ElseIf x >= grdEmps.ColPos(COL_NAME) And x < grdEmps.ColPos(COL_START) Then
|
||||
grdEmps.Col = COL_NAME
|
||||
grdEmps.Sort = flexSortStringNoCaseAscending
|
||||
grdEmps.Col = COL_ID
|
||||
grdEmps.ColSel = COL_ACTIVE
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function Field2Bool(vntValue As Variant) As Boolean
|
||||
If IsNull(vntValue) Then
|
||||
Field2Bool = False
|
||||
Else
|
||||
Field2Bool = CBool(vntValue)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub PictureSet()
|
||||
grdEmps.CellPictureAlignment = flexAlignCenterCenter
|
||||
Set grdEmps.CellPicture = imgCheck.Picture
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,232 @@
|
||||
VERSION 5.00
|
||||
Object = "{DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0"; "TODG7.OCX"
|
||||
Begin VB.Form Form1
|
||||
Caption = "Form1"
|
||||
ClientHeight = 6120
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 7605
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 6120
|
||||
ScaleWidth = 7605
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdLast
|
||||
Caption = "Last Record"
|
||||
Height = 615
|
||||
Left = 5820
|
||||
TabIndex = 5
|
||||
Top = 5400
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Caption = "First Record"
|
||||
Height = 495
|
||||
Left = 4620
|
||||
TabIndex = 4
|
||||
Top = 5400
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Caption = "Next Record"
|
||||
Height = 675
|
||||
Left = 3120
|
||||
TabIndex = 3
|
||||
Top = 5340
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Caption = "Previous Record"
|
||||
Height = 615
|
||||
Left = 1500
|
||||
TabIndex = 2
|
||||
Top = 5340
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.CommandButton cmdRebind
|
||||
Caption = "Rebind"
|
||||
Height = 615
|
||||
Left = 300
|
||||
TabIndex = 1
|
||||
Top = 5340
|
||||
Width = 1095
|
||||
End
|
||||
Begin TrueOleDBGrid70.TDBGrid TDBGrid1
|
||||
Bindings = "Form1.frx":0000
|
||||
Height = 4995
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 60
|
||||
Width = 7515
|
||||
_ExtentX = 13256
|
||||
_ExtentY = 8811
|
||||
_LayoutType = 0
|
||||
_RowHeight = -2147483647
|
||||
_WasPersistedAsPixels= 0
|
||||
Columns(0)._VlistStyle= 0
|
||||
Columns(0)._MaxComboItems= 5
|
||||
Columns(0).DataField= ""
|
||||
Columns(0)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(1)._VlistStyle= 0
|
||||
Columns(1)._MaxComboItems= 5
|
||||
Columns(1).DataField= ""
|
||||
Columns(1)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns.Count = 2
|
||||
Splits(0)._UserFlags= 0
|
||||
Splits(0).RecordSelectorWidth= 503
|
||||
Splits(0)._SavedRecordSelectors= 0 'False
|
||||
Splits(0).DividerColor= 12632256
|
||||
Splits(0).SpringMode= 0 'False
|
||||
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
|
||||
Splits(0)._ColumnProps(0)= "Columns.Count=2"
|
||||
Splits(0)._ColumnProps(1)= "Column(0).Width=2725"
|
||||
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
|
||||
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=2646"
|
||||
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
|
||||
Splits(0)._ColumnProps(5)= "Column(1).Width=2725"
|
||||
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
|
||||
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=2646"
|
||||
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
|
||||
Splits.Count = 1
|
||||
PrintInfos(0)._StateFlags= 0
|
||||
PrintInfos(0).Name= "piInternal 0"
|
||||
PrintInfos(0).PageHeaderFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageFooterFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageHeaderHeight= 0
|
||||
PrintInfos(0).PageFooterHeight= 0
|
||||
PrintInfos.Count= 1
|
||||
DefColWidth = 0
|
||||
HeadLines = 1
|
||||
FootLines = 1
|
||||
MultipleLines = 0
|
||||
CellTipsWidth = 0
|
||||
DeadAreaBackColor= 12632256
|
||||
RowDividerColor = 12632256
|
||||
RowSubDividerColor= 12632256
|
||||
DirectionAfterEnter= 1
|
||||
MaxRows = 250000
|
||||
ViewColumnCaptionWidth= 0
|
||||
ViewColumnWidth = 0
|
||||
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
|
||||
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
|
||||
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
|
||||
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
|
||||
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=825,.italic=0"
|
||||
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(5) = ":id=0,.fontname=MS Sans Serif"
|
||||
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
|
||||
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
|
||||
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34"
|
||||
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
|
||||
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
|
||||
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
|
||||
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
|
||||
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
|
||||
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
|
||||
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
|
||||
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
|
||||
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
|
||||
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
|
||||
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
|
||||
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
|
||||
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
|
||||
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
|
||||
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
|
||||
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
|
||||
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
|
||||
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
|
||||
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
|
||||
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
|
||||
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=28,.parent=13"
|
||||
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=25,.parent=14"
|
||||
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=26,.parent=15"
|
||||
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=27,.parent=17"
|
||||
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=32,.parent=13"
|
||||
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=29,.parent=14"
|
||||
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=30,.parent=15"
|
||||
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=31,.parent=17"
|
||||
_StyleDefs(38) = "Named:id=33:Normal"
|
||||
_StyleDefs(39) = ":id=33,.parent=0"
|
||||
_StyleDefs(40) = "Named:id=34:Heading"
|
||||
_StyleDefs(41) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(42) = ":id=34,.wraptext=-1"
|
||||
_StyleDefs(43) = "Named:id=35:Footing"
|
||||
_StyleDefs(44) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(45) = "Named:id=36:Selected"
|
||||
_StyleDefs(46) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(47) = "Named:id=37:Caption"
|
||||
_StyleDefs(48) = ":id=37,.parent=34,.alignment=2"
|
||||
_StyleDefs(49) = "Named:id=38:HighlightRow"
|
||||
_StyleDefs(50) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(51) = "Named:id=39:EvenRow"
|
||||
_StyleDefs(52) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
|
||||
_StyleDefs(53) = "Named:id=40:OddRow"
|
||||
_StyleDefs(54) = ":id=40,.parent=33"
|
||||
_StyleDefs(55) = "Named:id=41:RecordSelector"
|
||||
_StyleDefs(56) = ":id=41,.parent=34"
|
||||
_StyleDefs(57) = "Named:id=42:FilterBar"
|
||||
_StyleDefs(58) = ":id=42,.parent=33"
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "Form1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Dim moRS As Recordset
|
||||
|
||||
|
||||
Private Sub cmdFindInv_Click()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, lngFind As Long
|
||||
|
||||
strSQL = "SELECT * from tblInvtry" ' WHERE Inv_no = " & txtLMInvNo.Text
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
' TDBGrid1.DataSource = oRS
|
||||
Set TDBGrid1.DataSource = oRS
|
||||
TDBGrid1.ReBind
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
moRS.MoveFirst
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
moRS.MoveLast
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
moRS.MoveNext
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
moRS.MovePrevious
|
||||
End Sub
|
||||
|
||||
Private Sub cmdRebind_Click()
|
||||
' Set TDBGrid1.DataSource = rs
|
||||
TDBGrid1.ReBind
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
' Dim oRS As Recordset
|
||||
Dim strSQL As String, lngFind As Long
|
||||
|
||||
strSQL = "SELECT * from tblInvtry" ' WHERE Inv_no = " & txtLMInvNo.Text
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
' moRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
' TDBGrid1.DataSource = oRS
|
||||
Set TDBGrid1.DataSource = moRS
|
||||
' TDBGrid1.ReBind
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,865 @@
|
||||
VERSION 5.00
|
||||
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 frmMANBILL
|
||||
Caption = "Accounts Receivable"
|
||||
ClientHeight = 4950
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 7530
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4950
|
||||
ScaleWidth = 7530
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 3000
|
||||
Left = 180
|
||||
TabIndex = 17
|
||||
Top = 585
|
||||
Width = 4470
|
||||
_Version = 196608
|
||||
_ExtentX = 7885
|
||||
_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 = 5
|
||||
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= -1
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmMANBILL.frx":0000
|
||||
End
|
||||
Begin VB.TextBox txtTax
|
||||
Height = 315
|
||||
Left = 5580
|
||||
TabIndex = 16
|
||||
Top = 3000
|
||||
Width = 495
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 165
|
||||
Top = 60
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "RePrint Invoice"
|
||||
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 = 6180
|
||||
TabIndex = 14
|
||||
Top = 3675
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.ComboBox cboARCode
|
||||
Height = 315
|
||||
Left = 2955
|
||||
Sorted = -1 'True
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 1
|
||||
Top = 195
|
||||
Width = 4515
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "E&xit"
|
||||
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 = 6180
|
||||
TabIndex = 13
|
||||
Top = 4395
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 6180
|
||||
TabIndex = 12
|
||||
Top = 2955
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CheckBox chkReady
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Ready to Transfer to CMS:"
|
||||
Height = 315
|
||||
Left = 5190
|
||||
TabIndex = 7
|
||||
Top = 2415
|
||||
Width = 2205
|
||||
End
|
||||
Begin VB.TextBox txtItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 6
|
||||
Top = 1935
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtSalesCode
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 7
|
||||
TabIndex = 5
|
||||
Top = 1515
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 4
|
||||
Top = 1095
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 3
|
||||
Top = 675
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.ListBox lstDetail
|
||||
Height = 1230
|
||||
Left = 180
|
||||
TabIndex = 2
|
||||
Top = 3660
|
||||
Width = 5895
|
||||
End
|
||||
Begin VB.Label lblTax
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Tax Code"
|
||||
Height = 195
|
||||
Left = 4830
|
||||
TabIndex = 15
|
||||
Top = 3090
|
||||
Width = 690
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "CMS Sales Code:"
|
||||
Height = 195
|
||||
Left = 4920
|
||||
TabIndex = 11
|
||||
Top = 1620
|
||||
Width = 1245
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Item Amount:"
|
||||
Height = 195
|
||||
Left = 5235
|
||||
TabIndex = 10
|
||||
Top = 2040
|
||||
Width = 930
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Payment Due Date:"
|
||||
Height = 195
|
||||
Left = 4770
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Date:"
|
||||
Height = 195
|
||||
Left = 5190
|
||||
TabIndex = 8
|
||||
Top = 780
|
||||
Width = 960
|
||||
End
|
||||
Begin VB.Label lblARCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Builder's MAS90 AR Code:"
|
||||
Height = 195
|
||||
Left = 1020
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 1890
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmMANBILL"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSDetail As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
'Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
' strTYPE = Trim(Left(cboARCode, 7))
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt from tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt FROM tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
' strTYPE = oRS.RecordCount
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
strLine = ""
|
||||
strLine = Field2Str2(oRS!Lot_id) & vbTab & Field2Str(oRS!invoice_no) & vbTab & Field2Str(oRS!invoice_date) & vbTab
|
||||
strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "Currency") & vbTab & Format(Field2Str2(oRS!Lot_id), "000000")
|
||||
' strLine = ""
|
||||
' strLine = Field2Str(oRS!invoice_no) & " " & Field2Str(oRS!invoice_date) & vbTab
|
||||
' strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "Currency") & " " & Format(Field2Str2(oRS!Lot_id), "000000")
|
||||
.AddItem strLine
|
||||
' .AddItem strLine
|
||||
' .ItemData(.NewIndex) = oRS!Trans_ID
|
||||
' .ItemData(.NewIndex) = oRS!Lot_ID
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
gintLOTID = 0
|
||||
lstHeader.ListIndex = -1
|
||||
cmdPrint.Enabled = False
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Repair - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub DetailLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
lstHeader.col = 1
|
||||
mstrINVNO = lstHeader.ColText
|
||||
' strSQL = "SELECT trans_ID, sales_code, lot_id, header, shipped, description, amount from tblARInvoice WHERE shipped and lot_id = " & gintLOTID & " and not done"
|
||||
strSQL = "SELECT trans_ID, sales_code, lot_id, header, shipped, description, amount from tblARInvoice WHERE shipped and Invoice_no = '" & mstrINVNO & "' and not done"
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
' msglInvTotal = 0
|
||||
lstDetail.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
strLine = ""
|
||||
' msglInvTotal = msglInvTotal + field2single(oRS!amount)
|
||||
If Len(Format(Field2Str2(oRS!amount), "currency")) > 7 Then
|
||||
strLine = Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "currency") & vbTab & Field2Str(oRS!Description)
|
||||
Else
|
||||
strLine = Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "currency") & vbTab & vbTab & Field2Str(oRS!Description)
|
||||
End If
|
||||
lstDetail.AddItem strLine
|
||||
lstDetail.ItemData(lstDetail.NewIndex) = Field2Long(oRS!Trans_ID)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstDetail.ListCount Then
|
||||
lstDetail.ListIndex = 0
|
||||
Else
|
||||
lstDetail.ListIndex = -1
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module DetailLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Change()
|
||||
lstHeader.Clear
|
||||
lstDetail.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Click()
|
||||
lstHeader.Clear
|
||||
lstDetail.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub chkReady_Click()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT trans_id, ProjLot, PO_Num FROM tblARINVOICE WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
gstrPONUM = Field2Str(oRS!po_num)
|
||||
mstrPROJLOT = Field2Str(oRS!ProjLot)
|
||||
Call LotChange(mstrPROJLOT, "RePrint AR Invoice")
|
||||
|
||||
strSELECT = "{tblARInvoice.po_num} = '" & gstrPONUM & "'"
|
||||
' strSELECT = "{tblARInvoice.invoice_no}='" & mstrINV & "'"
|
||||
crAR.ReportFileName = App.Path & "\invoice.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
' crAR.CopiesToPrinter = gintCOPY
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
' crar.Destination = crptToPrinter
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotInfo - Module PrintStoneInv"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
' Call DataHasChanged
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSProj.State = adStateOpen Then
|
||||
moRSProj.Close
|
||||
End If
|
||||
If moRSDetail.State = adStateOpen Then
|
||||
moRSDetail.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
mintBOOKMARK = lstDetail.ListIndex
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
lstDetail.Enabled = True
|
||||
lstDetail.ListIndex = mintBOOKMARK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call ARCodeLoad
|
||||
|
||||
End Sub
|
||||
Private Sub ProjLoad()
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID
|
||||
|
||||
Set moRSProj = New Recordset
|
||||
moRSProj.Open strSQL, goConn, _
|
||||
adOpenForwardOnly, adLockReadOnly
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module ProjLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
Private Sub ARCodeLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, intRows As Integer, strLine As String
|
||||
Dim row, col As Long
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
' strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
Do Until oRS.EOF
|
||||
strLine = Field2Str(oRS!cust_no) & " - " & Field2Str(oRS!Name)
|
||||
cboARCode.AddItem strLine
|
||||
cboARCode.ItemData(cboARCode.NewIndex) = Field2Long(oRS!Bill_Id)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module ARCodeLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSDetail
|
||||
txtInvDate = Field2Str(!invoice_date)
|
||||
txtDueDate = Field2Str(!inv_due_date)
|
||||
txtItemAmt = Format(Field2Str2(!amount), "currency")
|
||||
txtSalesCode = Field2Str(!sales_code)
|
||||
txtTax = Field2Str(!taxcode)
|
||||
If txtTax = "AZ" Then
|
||||
txtTax.BackColor = &H80FFFF
|
||||
txtTax.ForeColor = &HFF&
|
||||
txtTax.FontBold = True
|
||||
Else
|
||||
txtTax.BackColor = &H80000005
|
||||
txtTax.ForeColor = &H80000008
|
||||
txtTax.FontBold = False
|
||||
End If
|
||||
chkReady = Field2CheckBox(!ready)
|
||||
End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Function FormFindDetail() As Boolean
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblARInvoice "
|
||||
strSQL = strSQL & "WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
Set moRSDetail = New Recordset
|
||||
moRSDetail.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSDetail.EOF Then
|
||||
FormFindDetail = False
|
||||
Else
|
||||
FormFindDetail = True
|
||||
msglInvTotal = moRSDetail!non_tax_amt
|
||||
mstrType = moRSDetail!inv_type
|
||||
gintPROJID = moRSDetail!Proj_ID
|
||||
Call ProjLoad
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormFindDetail"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstDetail_Click()
|
||||
If lstDetail.ListIndex <> -1 Then
|
||||
If FormFindDetail() Then
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSDetail
|
||||
!invoice_date = Str2Field(txtInvDate)
|
||||
!inv_due_date = Str2Field(txtDueDate)
|
||||
!price = Str2Field(txtItemAmt)
|
||||
!amount = Str2Field(txtItemAmt)
|
||||
!sales_code = Str2Field(txtSalesCode)
|
||||
.Update
|
||||
End With
|
||||
|
||||
strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID & " and not done"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
msglInvTotal = Field2Str2(oRS!sglTOTAL)
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = Str2Field(txtInvDate)
|
||||
!inv_due_date = Str2Field(txtDueDate)
|
||||
!ready = chkReady
|
||||
!non_tax_amt = msglInvTotal
|
||||
!taxcode = Str2Field(txtTax)
|
||||
If Field2Str2(moRSProj!retention) > 0 Then
|
||||
!retention_amt = Format(((msglInvTotal * Field2Str2(moRSProj!retention) / 100)), "#.00")
|
||||
Else
|
||||
!retention_amt = 0
|
||||
End If
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
' If lstHeader.ListCount = 0 Then
|
||||
' intResponse = MsgBox("No Invoices For This Builder - Select A Different Builder.", vbExclamation + vbOKOnly, "Exit Form")
|
||||
' Unload Me
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvDate = ""
|
||||
txtDueDate = ""
|
||||
txtSalesCode = ""
|
||||
txtItemAmt = ""
|
||||
chkReady = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Sub lstDetail_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
On Error GoTo Error_EH
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
cmdPrint.Enabled = True
|
||||
lstHeader.col = 4
|
||||
gintLOTID = lstHeader.ColText
|
||||
' gintLOTID = lstHeader.ItemData(lstHeader.ListIndex)
|
||||
Call DetailLoad
|
||||
If lstDetail.ListIndex <> -1 Then
|
||||
Else
|
||||
lstDetail.Clear
|
||||
Call FormClear
|
||||
End If
|
||||
Else
|
||||
cmdPrint.Enabled = False
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module lstHeader_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_GotFocus()
|
||||
Call FieldSelect(txtDueDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
lngPOS = InStr(1, txtDueDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtDueDate) > 0 Then
|
||||
txtDueDate = Format(txtDueDate, "00/00/####")
|
||||
If Not IsDate(txtDueDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
ElseIf IsDate(txtDueDate) Then
|
||||
Exit Sub
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvDate_GotFocus()
|
||||
Call FieldSelect(txtInvDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
lngPOS = InStr(1, txtInvDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtInvDate) > 0 Then
|
||||
txtInvDate = Format(txtInvDate, "00/00/####")
|
||||
If Not IsDate(txtInvDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtInvDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
ElseIf IsDate(txtInvDate) Then
|
||||
Exit Sub
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtInvDate.SetFocus
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtItemAmt_GotFocus()
|
||||
Call FieldSelect(txtItemAmt)
|
||||
msglItemAmt = Single2Field(txtItemAmt)
|
||||
End Sub
|
||||
|
||||
Private Sub txtItemAmt_LostFocus()
|
||||
If msglItemAmt < Field2Str2(txtItemAmt) Then
|
||||
msglInvTotal = msglInvTotal + Field2Str2(txtItemAmt)
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
ElseIf msglItemAmt > Field2Str2(txtItemAmt) Then
|
||||
msglInvTotal = msglInvTotal - Field2Str2(txtItemAmt)
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
ElseIf msglItemAmt = Field2Str(txtItemAmt) Then
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtSalesCode_GotFocus()
|
||||
Call FieldSelect(txtSalesCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtSalesCode_LostFocus()
|
||||
txtSalesCode = UCase(txtSalesCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtTax_GotFocus()
|
||||
Call FieldSelect(txtTax)
|
||||
End Sub
|
||||
|
||||
Private Sub txtTax_LostFocus()
|
||||
If Not IsNull(txtTax) Or txtTax = "" Then
|
||||
txtTax = UCase(txtTax)
|
||||
Else
|
||||
MsgBox "You Must Enter A Sales Tax Code", vbOKOnly, "No Tax Code"
|
||||
txtTax.SetFocus
|
||||
End If
|
||||
End Sub
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,998 @@
|
||||
VERSION 5.00
|
||||
Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx"
|
||||
Begin VB.Form frmLotList
|
||||
Caption = "Lot Information List"
|
||||
ClientHeight = 8595
|
||||
ClientLeft = 60
|
||||
ClientTop = 7245
|
||||
ClientWidth = 6975
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
MinButton = 0 'False
|
||||
ScaleHeight = 8595
|
||||
ScaleWidth = 6975
|
||||
Begin LpLib.fpList lstInvoice
|
||||
Height = 1245
|
||||
Left = 60
|
||||
TabIndex = 12
|
||||
Top = 7110
|
||||
Width = 6855
|
||||
_Version = 196608
|
||||
_ExtentX = 12091
|
||||
_ExtentY = 2196
|
||||
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 = 7
|
||||
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= -1
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmLotList2.frx":0000
|
||||
End
|
||||
Begin LpLib.fpList lstPOWO
|
||||
Height = 1065
|
||||
Left = 60
|
||||
TabIndex = 11
|
||||
Top = 5700
|
||||
Width = 6855
|
||||
_Version = 196608
|
||||
_ExtentX = 12091
|
||||
_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 = -1 'True
|
||||
BackColor = -2147483643
|
||||
ForeColor = -2147483640
|
||||
Columns = 6
|
||||
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 = "frmLotList2.frx":047C
|
||||
End
|
||||
Begin VB.CommandButton cmdSetYard
|
||||
Caption = "Setup Yard List"
|
||||
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 = 3427
|
||||
TabIndex = 9
|
||||
Top = 3795
|
||||
Width = 1770
|
||||
End
|
||||
Begin VB.CommandButton cmdYard
|
||||
Caption = "Yard Order"
|
||||
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 = 5565
|
||||
TabIndex = 8
|
||||
Top = 3795
|
||||
Width = 1320
|
||||
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 = 240
|
||||
Left = 2145
|
||||
TabIndex = 7
|
||||
Top = 3795
|
||||
Width = 915
|
||||
End
|
||||
Begin VB.ListBox lstPayroll
|
||||
Height = 1425
|
||||
Left = 60
|
||||
TabIndex = 6
|
||||
Top = 4095
|
||||
Width = 6855
|
||||
End
|
||||
Begin VB.ListBox lstPO
|
||||
Height = 1425
|
||||
Left = 60
|
||||
TabIndex = 5
|
||||
Top = 2340
|
||||
Width = 6855
|
||||
End
|
||||
Begin VB.ListBox lstRepairs
|
||||
Height = 1035
|
||||
Left = 60
|
||||
TabIndex = 2
|
||||
Top = 1065
|
||||
Width = 6855
|
||||
End
|
||||
Begin VB.Label lblPOWOList
|
||||
AutoSize = -1 'True
|
||||
Caption = "Billable PO/WO 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 = 60
|
||||
TabIndex = 14
|
||||
Top = 5505
|
||||
Width = 1710
|
||||
End
|
||||
Begin VB.Label lblInvoiceList
|
||||
AutoSize = -1 'True
|
||||
Caption = "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 = 60
|
||||
TabIndex = 13
|
||||
Top = 6900
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblMatPO
|
||||
AutoSize = -1 'True
|
||||
Caption = "Payroll 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 = 195
|
||||
Left = 60
|
||||
TabIndex = 10
|
||||
Top = 3780
|
||||
Width = 1590
|
||||
End
|
||||
Begin VB.Label lblPO
|
||||
AutoSize = -1 'True
|
||||
Caption = "Orders 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 = 60
|
||||
TabIndex = 4
|
||||
Top = 2130
|
||||
Width = 930
|
||||
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 = 60
|
||||
TabIndex = 3
|
||||
Top = 855
|
||||
Width = 930
|
||||
End
|
||||
Begin VB.Line Line1
|
||||
BorderWidth = 3
|
||||
X1 = 15
|
||||
X2 = 6975
|
||||
Y1 = 810
|
||||
Y2 = 810
|
||||
End
|
||||
Begin VB.Label lblLot
|
||||
Alignment = 2 'Center
|
||||
Caption = "Lot Information"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 13.5
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 315
|
||||
Left = 60
|
||||
TabIndex = 1
|
||||
Top = 15
|
||||
Width = 6795
|
||||
End
|
||||
Begin VB.Label lblProjLot
|
||||
Alignment = 2 'Center
|
||||
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 = 300
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 360
|
||||
Width = 6855
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmLotList"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim mstrWTYPE As String, mstrWDone As String, mboolPROJ As Boolean
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSetYard_Click()
|
||||
Dim oRS As Recordset, oRSS As Recordset
|
||||
Dim strSQL As String, strSql2 As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblOrdMatrl WHERE not x_flag and Order_Id = " & lstPO.ItemData(lstPO.ListIndex)
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
If Not oRS.EOF Then
|
||||
strSql2 = "SELECT * FROM tblYardOrder"
|
||||
Set oRSS = New Recordset
|
||||
oRSS.Open strSql2, goConn, adOpenKeyset, adLockOptimistic
|
||||
Else
|
||||
MsgBox "No Order Items to Process", vbOKOnly, "No Items"
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRSS
|
||||
.AddNew
|
||||
!Lot_ID = oRS!Lot_ID
|
||||
!inv_no = oRS!inv_no
|
||||
!Desc = oRS!Desc
|
||||
!qty = oRS!o_qty
|
||||
!qtyIssue = oRS!o_qty
|
||||
!po_num = oRS!po_num
|
||||
!createuser = gstrLOGIN
|
||||
.Update
|
||||
oRS!x_flag = vbChecked
|
||||
oRS.Update
|
||||
oRS.MoveNext
|
||||
End With
|
||||
Loop
|
||||
|
||||
Exit Sub
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module cmdSetYard"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdYard_Click()
|
||||
frmShowYardMat.Show 1
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Exit Sub
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module Form_Activate"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
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
|
||||
|
||||
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
|
||||
|
||||
|
||||
Call POWOLoad
|
||||
Call RepairLoad
|
||||
Call OrderLoad
|
||||
Call PayrollLoad
|
||||
Call InvoiceLoad
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Unload Me
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module Form_Load"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
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
|
||||
|
||||
aTabs(0) = 50
|
||||
aTabs(1) = 95
|
||||
aTabs(2) = 170
|
||||
' aTabs(3) = 190
|
||||
|
||||
strSQL = "SELECT Repair_id, Proj_lot, Scheduled, completed, 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
|
||||
|
||||
lngRET = SendMessage(lstRepairs.hwnd, LB_SETTABSTOPS, 3, aTabs(0))
|
||||
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 = Field2Str(oRS!scheduled) & vbTab & Field2Str(oRS!completed) & vbTab
|
||||
' strLine = Field2Str(oRS!scheduled) & " " & Field2Str(oRS!completed) & " "
|
||||
strLine = strLine & strTYPE & 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 LotList - Module RepairLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub InvoiceLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strLine As String, strTYPE As String, strWORK As String, strINVT As String
|
||||
'dim
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
|
||||
strSQL = "SELECT * FROM tblARINVOICE WHERE lot_id = " & gintLOTID & " ORDER BY INVOICE_DATE"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstInvoice.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstInvoice
|
||||
strINVT = oRS!inv_type
|
||||
If strINVT = "L" Then
|
||||
strTYPE = "LATH"
|
||||
ElseIf strINVT = "S" Then
|
||||
strTYPE = "STUCCO"
|
||||
ElseIf strINVT = "PE" Then
|
||||
strTYPE = "PAINT EXTERIOR"
|
||||
ElseIf strINVT = "PF" Then
|
||||
strTYPE = "PAINT FINAL"
|
||||
ElseIf strINVT = "PI" Then
|
||||
strTYPE = "PAINT INTERNAL"
|
||||
ElseIf strINVT = "V" Then
|
||||
strTYPE = "STONE"
|
||||
Else
|
||||
strTYPE = "UNKNOWN"
|
||||
End If
|
||||
|
||||
' mstrWDone = Field2Str(oRS!workdone)
|
||||
' Call GetWorkType
|
||||
' strWORK = mstrWTYPE
|
||||
|
||||
strLine = ""
|
||||
strLine = Field2Str2(oRS!Trans_ID) & vbTab & Field2Str(oRS!invoice_date) & vbTab
|
||||
strLine = strLine & Field2Str(oRS!invoice_no) & vbTab & Field2Str(strTYPE) & vbTab
|
||||
' strLine = strLine & Field2Str(oRS!strWORK) & vbTab & Field2Str2(oRS!NON_TAX_AMT) ' & vbTab
|
||||
strLine = strLine & Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "#,#.00") & vbTab & Format(Field2Str2(oRS!non_tax_amt), "#,#.00")
|
||||
' strLine = strLine & Field2Str(oRS!SALES_CODE) & vbTab & Field2Str2(oRS!NON_TAX_AMT) ' & vbTab
|
||||
' strLine = Field2Str(oRS!scheduled) & " " & Field2Str(oRS!completed) & " "
|
||||
' strLine = strLine & strTYPE & 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 LotList - Module InvoiceLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub GetWorkType()
|
||||
Dim strSQL As String, oRSW As Recordset
|
||||
|
||||
strSQL = "SELECT * FROM tblcboWorkType WHERE WTCode = '" & mstrWDone & "'"
|
||||
Set oRSW = New Recordset
|
||||
oRSW.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
If Not oRSW.EOF Then
|
||||
mstrWTYPE = Field2Str(oRSW!worktype)
|
||||
End If
|
||||
|
||||
oRSW.Close
|
||||
End Sub
|
||||
|
||||
Private Sub PayrollLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strLine As String, strTYPE As String, strWORK As String
|
||||
Dim lngRET As Long, aTabs(3) As Long
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
aTabs(0) = 40
|
||||
aTabs(1) = 120
|
||||
aTabs(2) = 145
|
||||
aTabs(3) = 190
|
||||
|
||||
strSQL = "SELECT * FROM tblTime WHERE lot_id = " & gintLOTID ' & " ORDER BY Order_Date"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lngRET = SendMessage(lstPayroll.hwnd, LB_SETTABSTOPS, 4, aTabs(0))
|
||||
lstPayroll.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstPayroll
|
||||
If Field2Str(oRS!pay_type) = "L" Then
|
||||
strTYPE = "LATH"
|
||||
ElseIf Field2Str(oRS!pay_type) = "C" Then
|
||||
strTYPE = "SCAFFOLD"
|
||||
ElseIf Field2Str(oRS!pay_type) = "S" Then
|
||||
strTYPE = "STUCCO"
|
||||
ElseIf Field2Str(oRS!pay_type) = "Y" Then
|
||||
strTYPE = "SYNTHETIC"
|
||||
ElseIf Field2Str(oRS!pay_type) = "V" Then
|
||||
strTYPE = "STONE"
|
||||
ElseIf Field2Str(oRS!pay_type) = "X" Then
|
||||
strTYPE = "PAINT"
|
||||
End If
|
||||
mstrWDone = Field2Str(oRS!WorkDone)
|
||||
Call GetWorkType
|
||||
strWORK = mstrWTYPE
|
||||
|
||||
' If Field2Str(oRS!workdone) = "C" Then
|
||||
' strWORK = "COMPLETE"
|
||||
' ElseIf Field2Str(oRS!workdone) = "B" Then
|
||||
' strWORK = "BROWN"
|
||||
' ElseIf Field2Str(oRS!workdone) = "F" Then
|
||||
' strWORK = "FENCE"
|
||||
' ElseIf Field2Str(oRS!workdone) = "T" Then
|
||||
' strWORK = "TEXTURE"
|
||||
' ElseIf Field2Str(oRS!workdone) = "W" Then
|
||||
' strWORK = "WORK ORDER"
|
||||
' ElseIf Field2Str(oRS!workdone) = "U" Then
|
||||
' strWORK = "CMU WALL"
|
||||
' ElseIf Field2Str(oRS!workdone) = "P" Then
|
||||
' strWORK = "PARTIAL"
|
||||
' ElseIf Field2Str(oRS!workdone) = "R" Then
|
||||
' strWORK = "REPAIR"
|
||||
' ElseIf Field2Str(oRS!workdone) = "S" Then
|
||||
' strWORK = "SCRATCH"
|
||||
' ElseIf Field2Str(oRS!workdone) = "Z" Then
|
||||
' strWORK = "DOWN"
|
||||
' ElseIf Field2Str(oRS!workdone) = "Y" Then
|
||||
' strWORK = "UP"
|
||||
' End If
|
||||
|
||||
strLine = strTYPE & vbTab & strWORK & vbTab
|
||||
strLine = strLine & Field2Str(oRS!paydt) & vbTab & Format(Field2Str(oRS!pay_amt), "#,#.00")
|
||||
' strLine = strLine & Field2Str(oRS!prdate) & vbTab & Format(Field2Str(oRS!pay_amt), "#,#.00")
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = Field2Long(oRS!idnum)
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module PayrollLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub POLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT ponum, towhom, desc, date from tblPOrder WHERE lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstPO.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstPO
|
||||
strLine = Field2Str(oRS!Date) & vbTab & Field2Str(oRS!ponum) & vbTab
|
||||
strLine = strLine & Field2Str(oRS!towhom) & vbTab & Field2Str(oRS!Desc)
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = oRS!ponum
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module POLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub OrderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strLine As String
|
||||
Dim strTYPE As String, strDESC As String
|
||||
Dim lngRET As Long, aTabs(3) As Long
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
aTabs(0) = 45
|
||||
aTabs(1) = 70
|
||||
aTabs(2) = 145
|
||||
aTabs(3) = 190
|
||||
|
||||
strSQL = "SELECT order_id, ponum, m_type, po_num, order_date, supplier from tblOrders WHERE lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lngRET = SendMessage(lstPO.hwnd, LB_SETTABSTOPS, 4, aTabs(0))
|
||||
lstPO.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstPO
|
||||
Call SetType(oRS!m_type, strDESC)
|
||||
|
||||
strLine = Field2Str(oRS!order_date) & vbTab & Field2Str(oRS!ponum) & vbTab
|
||||
strLine = strLine & Field2Str(oRS!po_num) & vbTab & strDESC & vbTab & Field2Str(oRS!supplier)
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = oRS!order_id
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module OrderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If lstRepairs.ListCount = 0 Then
|
||||
lstRepairs.Enabled = False
|
||||
Else
|
||||
lstRepairs.Enabled = True
|
||||
End If
|
||||
If lstInvoice.ListCount = 0 Then
|
||||
lstInvoice.Enabled = False
|
||||
Else
|
||||
lstInvoice.Enabled = True
|
||||
End If
|
||||
If lstPOWO.ListCount = 0 Then
|
||||
lstPOWO.Enabled = False
|
||||
Else
|
||||
lstPOWO.Enabled = True
|
||||
End If
|
||||
If lstPO.ListCount = 0 Then
|
||||
lstPO.Enabled = False
|
||||
Else
|
||||
lstPO.Enabled = True
|
||||
End If
|
||||
If lstPayroll.ListCount = 0 Then
|
||||
lstPayroll.Enabled = False
|
||||
Else
|
||||
lstPayroll.Enabled = True
|
||||
End If
|
||||
|
||||
' mboolSHOW = True
|
||||
' mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String, strProj As String, strMEMO As String
|
||||
Dim oRS As Recordset, oRSS As Recordset
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblLotInfo "
|
||||
strSQL = strSQL & "WHERE Lot_ID = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, _
|
||||
adOpenKeyset, adLockPessimistic
|
||||
|
||||
strProj = "SELECT * "
|
||||
strProj = strProj & "FROM tblproject "
|
||||
strProj = strProj & "WHERE proj_ID = " & Field2Long(oRS!PROJ_ID)
|
||||
' strProj = strProj & "WHERE proj_ID = " & Field2Integer(oRS!proj_id)
|
||||
Set oRSS = New Recordset
|
||||
oRSS.Open strProj, goConn, _
|
||||
adOpenKeyset, adLockPessimistic
|
||||
|
||||
If oRSS.EOF Then
|
||||
|
||||
End If
|
||||
|
||||
If oRS.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
lblProjLot.Caption = oRSS!Proj_Code & " " & oRS!lot_no & " " & oRSS!Proj_Desc
|
||||
End If
|
||||
oRS.Close
|
||||
oRSS.Close
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotList - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstInvoice_DblClick()
|
||||
MsgBox "Mouse has been DblClicked", vbOKOnly
|
||||
End Sub
|
||||
|
||||
Private Sub lstPayroll_DblClick()
|
||||
|
||||
lstPO.ListIndex = -1
|
||||
lstRepairs.ListIndex = -1
|
||||
Load frmPayroll
|
||||
frmPayroll.chkLOOK = vbChecked
|
||||
frmPayroll.Show 1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub lstPO_DblClick()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
|
||||
lstPayroll.ListIndex = -1
|
||||
lstRepairs.ListIndex = -1
|
||||
glngORDERID = lstPO.ItemData(lstPO.ListIndex)
|
||||
strSQL = "SELECT * FROM tblOrders WHERE order_id = " & glngORDERID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
If oRS!ponum > 0 Then
|
||||
glngORDERID = Field2Long(oRS!ponum)
|
||||
frmShowPO.Show 1
|
||||
Else
|
||||
' glngORDERID = 0
|
||||
frmShowOrderMat.Show 1
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub lstPOWO_DblClick()
|
||||
|
||||
lstPO.ListIndex = -1
|
||||
lstRepairs.ListIndex = -1
|
||||
lstPayroll.ListIndex = -1
|
||||
lstInvoice.ListIndex = -1
|
||||
Load frmPOWOLot
|
||||
frmPOWOLot.chkLOOK = vbChecked
|
||||
frmPOWOLot.Show 1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub lstRepairs_DblClick()
|
||||
|
||||
lstPayroll.ListIndex = -1
|
||||
lstPO.ListIndex = -1
|
||||
|
||||
gintREPAIRID = lstRepairs.ItemData(lstRepairs.ListIndex)
|
||||
frmShowRepair.Show 1
|
||||
End Sub
|
||||
|
||||
Private Sub POWOLoad()
|
||||
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
|
||||
|
||||
lstPOWO.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstPOWO
|
||||
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 lstPOWO.ListCount Then
|
||||
lstPOWO.ListIndex = 0
|
||||
mboolPROJ = False
|
||||
lstPOWO.Enabled = True
|
||||
Else
|
||||
lstPOWO.ListIndex = -1
|
||||
lstPOWO.Enabled = False
|
||||
' Call FormClear
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "FormLotList - Module POWOLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,892 @@
|
||||
VERSION 5.00
|
||||
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 frmAR2
|
||||
Caption = "Accounts Receivable"
|
||||
ClientHeight = 4950
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 7530
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4950
|
||||
ScaleWidth = 7530
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 2835
|
||||
Left = 195
|
||||
TabIndex = 17
|
||||
Top = 585
|
||||
Width = 4470
|
||||
_Version = 196608
|
||||
_ExtentX = 7885
|
||||
_ExtentY = 5001
|
||||
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 = 6
|
||||
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= -1
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmAR2.frx":0000
|
||||
End
|
||||
Begin VB.TextBox txtTax
|
||||
Height = 315
|
||||
Left = 5580
|
||||
TabIndex = 16
|
||||
Top = 3000
|
||||
Width = 495
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 165
|
||||
Top = 60
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "RePrint Invoice"
|
||||
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 = 6180
|
||||
TabIndex = 14
|
||||
Top = 3675
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.ComboBox cboARCode
|
||||
Height = 315
|
||||
Left = 2955
|
||||
Sorted = -1 'True
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 1
|
||||
Top = 195
|
||||
Width = 4515
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "E&xit"
|
||||
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 = 6180
|
||||
TabIndex = 13
|
||||
Top = 4395
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 6180
|
||||
TabIndex = 12
|
||||
Top = 2955
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CheckBox chkReady
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Ready to Transfer to CMS:"
|
||||
Height = 315
|
||||
Left = 5190
|
||||
TabIndex = 7
|
||||
Top = 2415
|
||||
Width = 2205
|
||||
End
|
||||
Begin VB.TextBox txtItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 11
|
||||
TabIndex = 6
|
||||
Top = 1935
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtSalesCode
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 7
|
||||
TabIndex = 5
|
||||
Top = 1515
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 4
|
||||
Top = 1095
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 3
|
||||
Top = 675
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.ListBox lstDetail
|
||||
Height = 1230
|
||||
Left = 180
|
||||
TabIndex = 2
|
||||
Top = 3660
|
||||
Width = 5895
|
||||
End
|
||||
Begin VB.Label lblTax
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Tax Code"
|
||||
Height = 195
|
||||
Left = 4830
|
||||
TabIndex = 15
|
||||
Top = 3090
|
||||
Width = 690
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "CMS Sales Code:"
|
||||
Height = 195
|
||||
Left = 4920
|
||||
TabIndex = 11
|
||||
Top = 1620
|
||||
Width = 1245
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Item Amount:"
|
||||
Height = 195
|
||||
Left = 5235
|
||||
TabIndex = 10
|
||||
Top = 2040
|
||||
Width = 930
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Payment Due Date:"
|
||||
Height = 195
|
||||
Left = 4770
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Date:"
|
||||
Height = 195
|
||||
Left = 5190
|
||||
TabIndex = 8
|
||||
Top = 780
|
||||
Width = 960
|
||||
End
|
||||
Begin VB.Label lblARCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Builder's CMS AR Code:"
|
||||
Height = 195
|
||||
Left = 1200
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 1710
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmAR2"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSDetail As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String, mstrPO_NUM As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String, mlngTRANSID As Long
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single, mlngTRANS2 As Long
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
'Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
' strTYPE = Trim(Left(cboARCode, 7))
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt from tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt FROM tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
' strTYPE = oRS.RecordCount
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
strLine = ""
|
||||
strLine = Field2Str2(oRS!Trans_ID) & vbTab & Field2Str(oRS!invoice_no) & vbTab & Field2Str(oRS!invoice_date) & vbTab
|
||||
' strLine = Field2Str2(oRS!Lot_id) & vbTab & Field2Str(oRS!invoice_no) & vbTab & Field2Str(oRS!invoice_date) & vbTab
|
||||
strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "#,#.00;(#,#.00)") & vbTab & Format(Field2Str2(oRS!Lot_ID), "000000") & vbTab & (Field2Str(oRS!po_num))
|
||||
' strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "#,#.00;(#,#.00)") & vbTab & Format(Field2Str2(oRS!Lot_id), "000000") & vbTab & Format(Field2Str(oRS!po_num))
|
||||
' strLine = ""
|
||||
' strLine = Field2Str(oRS!invoice_no) & " " & Field2Str(oRS!invoice_date) & vbTab
|
||||
' strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "Currency") & " " & Format(Field2Str2(oRS!Lot_id), "000000")
|
||||
.AddItem strLine
|
||||
' .AddItem strLine
|
||||
' .ItemData(.NewIndex) = oRS!Trans_ID
|
||||
' .ItemData(.NewIndex) = oRS!Lot_ID
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
gintLOTID = 0
|
||||
lstHeader.ListIndex = -1
|
||||
cmdPrint.Enabled = False
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Repair - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub DetailLoad()
|
||||
Dim oRS As Recordset, strSalesCode As String
|
||||
Dim strSQL As String, strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
' lstHeader.col = 1
|
||||
lstHeader.col = 0
|
||||
mlngTRANS2 = Field2Str2(lstHeader.ColText)
|
||||
' strSQL = "SELECT trans_ID, sales_code, lot_id, header, shipped, description, amount from tblARInvoice WHERE shipped and lot_id = " & gintLOTID & " and not done"
|
||||
strSQL = "SELECT trans_ID, sales_code, lot_id, header, shipped, description, amount, PO_NUM from tblARInvoice WHERE shipped and PO_NUM = '" & mstrPO_NUM & "' and not done"
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
' msglInvTotal = 0
|
||||
lstDetail.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
strSalesCode = Field2Str(oRS!sales_code)
|
||||
If Len(strSalesCode) = 0 Then
|
||||
strSalesCode = "BLANK"
|
||||
' Else
|
||||
|
||||
End If
|
||||
strLine = ""
|
||||
' msglInvTotal = msglInvTotal + field2single(oRS!amount)
|
||||
If Len(Format(Field2Str2(oRS!amount), "currency")) > 7 Then
|
||||
strLine = Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "currency") & vbTab & Field2Str(oRS!Description)
|
||||
Else
|
||||
strLine = Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "currency") & vbTab & vbTab & Field2Str(oRS!Description)
|
||||
End If
|
||||
lstDetail.AddItem strLine
|
||||
lstDetail.ItemData(lstDetail.NewIndex) = Field2Long(oRS!Trans_ID)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstDetail.ListCount Then
|
||||
lstDetail.ListIndex = 0
|
||||
Else
|
||||
lstDetail.ListIndex = -1
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module DetailLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Change()
|
||||
lstHeader.Clear
|
||||
lstDetail.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Click()
|
||||
lstHeader.Clear
|
||||
lstDetail.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub chkReady_Click()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT trans_id, ProjLot, PO_Num FROM tblARINVOICE WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
gstrPONUM = Field2Str(oRS!po_num)
|
||||
mstrPROJLOT = Field2Str(oRS!ProjLot)
|
||||
Call LotChange(mstrPROJLOT, "RePrint AR Invoice")
|
||||
|
||||
strSELECT = "{tblARInvoice.po_num} = '" & gstrPONUM & "'"
|
||||
' strSELECT = "{tblARInvoice.invoice_no}='" & mstrINV & "'"
|
||||
crAR.ReportFileName = App.Path & "\invoice.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
' crAR.CopiesToPrinter = gintCOPY
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
' crar.Destination = crptToPrinter
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotInfo - Module PrintStoneInv"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
' Call DataHasChanged
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSProj.State = adStateOpen Then
|
||||
moRSProj.Close
|
||||
End If
|
||||
If moRSDetail.State = adStateOpen Then
|
||||
moRSDetail.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
mintBOOKMARK = lstDetail.ListIndex
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
lstDetail.Enabled = True
|
||||
lstDetail.ListIndex = mintBOOKMARK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call ARCodeLoad
|
||||
|
||||
End Sub
|
||||
Private Sub ProjLoad()
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID
|
||||
|
||||
Set moRSProj = New Recordset
|
||||
moRSProj.Open strSQL, goConn, _
|
||||
adOpenForwardOnly, adLockReadOnly
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module ProjLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
Private Sub ARCodeLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, intRows As Integer, strLine As String
|
||||
Dim row, col As Long
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
' strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
Do Until oRS.EOF
|
||||
strLine = Field2Str(oRS!Cust_NO) & " - " & Field2Str(oRS!Name)
|
||||
cboARCode.AddItem strLine
|
||||
cboARCode.ItemData(cboARCode.NewIndex) = Field2Long(oRS!Bill_ID)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module ARCodeLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSDetail
|
||||
txtInvDate = Field2Str(!invoice_date)
|
||||
txtDueDate = Field2Str(!inv_due_date)
|
||||
txtItemAmt = Format(Field2Str2(!amount), "#,#.00;(#,#.00)")
|
||||
' txtItemAmt = Format(Field2Str2(!amount), "Standard")
|
||||
txtSalesCode = Field2Str(!sales_code)
|
||||
If Len(txtSalesCode) = 0 Then
|
||||
txtSalesCode = "BLANK"
|
||||
txtSalesCode.BackColor = &H80FFFF
|
||||
txtSalesCode.ForeColor = &HFF&
|
||||
Else
|
||||
txtSalesCode.BackColor = &H80000005
|
||||
txtSalesCode.ForeColor = &H80000008
|
||||
txtSalesCode.FontBold = False
|
||||
End If
|
||||
txtTAX = Field2Str(!taxcode)
|
||||
If txtTAX = "AZ" Then
|
||||
txtTAX.BackColor = &H80FFFF
|
||||
txtTAX.ForeColor = &HFF&
|
||||
txtTAX.FontBold = True
|
||||
Else
|
||||
txtTAX.BackColor = &H80000005
|
||||
txtTAX.ForeColor = &H80000008
|
||||
txtTAX.FontBold = False
|
||||
End If
|
||||
chkReady = Field2CheckBox(!ready)
|
||||
End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Function FormFindDetail() As Boolean
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblARInvoice "
|
||||
strSQL = strSQL & "WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
Set moRSDetail = New Recordset
|
||||
moRSDetail.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSDetail.EOF Then
|
||||
FormFindDetail = False
|
||||
Else
|
||||
FormFindDetail = True
|
||||
msglInvTotal = moRSDetail!non_tax_amt
|
||||
mstrType = moRSDetail!inv_type
|
||||
gintPROJID = moRSDetail!PROJ_ID
|
||||
Call ProjLoad
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormFindDetail"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstDetail_Click()
|
||||
If lstDetail.ListIndex <> -1 Then
|
||||
If FormFindDetail() Then
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String, lngTRANSID As Long
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSDetail
|
||||
!invoice_date = Str2Field(txtInvDate)
|
||||
!inv_due_date = Str2Field(txtDueDate)
|
||||
!price = Str2Field(txtItemAmt)
|
||||
!amount = Str2Field(txtItemAmt)
|
||||
!sales_code = Str2Field(txtSalesCode)
|
||||
.Update
|
||||
End With
|
||||
|
||||
strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE PO_NUM = '" & mstrPO_NUM & "' and lot_id = " & gintLOTID & " and not done"
|
||||
' strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE Trans_ID = " & mlngTRANSID & " and lot_id = " & gintLOTID & " and not done"
|
||||
' strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID & " and not done"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
msglInvTotal = Field2Str2(oRS!sglTOTAL)
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE PO_NUM = '" & mstrPO_NUM & "' and lot_id = " & gintLOTID
|
||||
' strSQL = "SELECT * FROM tblARInvoice WHERE Trans_ID = " & mlngTRANSID & " and lot_id = " & gintLOTID
|
||||
' strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = Str2Field(txtInvDate)
|
||||
!inv_due_date = Str2Field(txtDueDate)
|
||||
!ready = chkReady
|
||||
!non_tax_amt = msglInvTotal
|
||||
!taxcode = Str2Field(txtTAX)
|
||||
If Field2Str2(moRSProj!retention) > 0 Then
|
||||
!retention_amt = Format(((msglInvTotal * Field2Str2(moRSProj!retention) / 100)), "#.00")
|
||||
Else
|
||||
!retention_amt = 0
|
||||
End If
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
' If lstHeader.ListCount = 0 Then
|
||||
' intResponse = MsgBox("No Invoices For This Builder - Select A Different Builder.", vbExclamation + vbOKOnly, "Exit Form")
|
||||
' Unload Me
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvDate = ""
|
||||
txtDueDate = ""
|
||||
txtSalesCode = ""
|
||||
txtItemAmt = ""
|
||||
chkReady = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Sub lstDetail_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
On Error GoTo Error_EH
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
lstHeader.col = 0
|
||||
mlngTRANSID = Field2Str2(lstHeader.ColText)
|
||||
cmdPrint.Enabled = True
|
||||
lstHeader.col = 4
|
||||
gintLOTID = lstHeader.ColText
|
||||
lstHeader.col = 5
|
||||
mstrPO_NUM = Field2Str(lstHeader.ColText)
|
||||
' gintLOTID = lstHeader.ItemData(lstHeader.ListIndex)
|
||||
Call DetailLoad
|
||||
If lstDetail.ListIndex <> -1 Then
|
||||
Else
|
||||
lstDetail.Clear
|
||||
Call FormClear
|
||||
End If
|
||||
Else
|
||||
cmdPrint.Enabled = False
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module lstHeader_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_GotFocus()
|
||||
Call FieldSelect(txtDueDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
lngPOS = InStr(1, txtDueDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtDueDate) > 0 Then
|
||||
txtDueDate = Format(txtDueDate, "00/00/####")
|
||||
If Not IsDate(txtDueDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
ElseIf IsDate(txtDueDate) Then
|
||||
Exit Sub
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvDate_GotFocus()
|
||||
Call FieldSelect(txtInvDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
lngPOS = InStr(1, txtInvDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtInvDate) > 0 Then
|
||||
txtInvDate = Format(txtInvDate, "00/00/####")
|
||||
If Not IsDate(txtInvDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtInvDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
ElseIf IsDate(txtInvDate) Then
|
||||
Exit Sub
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtInvDate.SetFocus
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtItemAmt_GotFocus()
|
||||
Call FieldSelect(txtItemAmt)
|
||||
msglItemAmt = Single2Field(txtItemAmt)
|
||||
End Sub
|
||||
|
||||
Private Sub txtItemAmt_LostFocus()
|
||||
If msglItemAmt < Field2Str2(txtItemAmt) Then
|
||||
msglInvTotal = msglInvTotal + Field2Str2(txtItemAmt)
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
ElseIf msglItemAmt > Field2Str2(txtItemAmt) Then
|
||||
msglInvTotal = msglInvTotal - Field2Str2(txtItemAmt)
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
ElseIf msglItemAmt = Field2Str(txtItemAmt) Then
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtSalesCode_GotFocus()
|
||||
Call FieldSelect(txtSalesCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtSalesCode_LostFocus()
|
||||
txtSalesCode = UCase(txtSalesCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtTax_GotFocus()
|
||||
Call FieldSelect(txtTAX)
|
||||
End Sub
|
||||
|
||||
Private Sub txtTax_LostFocus()
|
||||
If Not IsNull(txtTAX) Or txtTAX = "" Then
|
||||
txtTAX = UCase(txtTAX)
|
||||
Else
|
||||
MsgBox "You Must Enter A Sales Tax Code", vbOKOnly, "No Tax Code"
|
||||
txtTAX.SetFocus
|
||||
End If
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,684 @@
|
||||
VERSION 5.00
|
||||
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "Crystl32.OCX"
|
||||
Begin VB.Form frmInvPrice
|
||||
Caption = "Supplier Inventory Prices"
|
||||
ClientHeight = 5265
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 11235
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5265
|
||||
ScaleWidth = 11235
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "Print Inv List"
|
||||
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 = 6780
|
||||
TabIndex = 16
|
||||
Top = 2400
|
||||
Width = 1155
|
||||
End
|
||||
Begin Crystal.CrystalReport crInvList
|
||||
Left = 10485
|
||||
Top = 2535
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
PrintFileLinesPerPage= 60
|
||||
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 = 8400
|
||||
TabIndex = 15
|
||||
Top = 2400
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.ListBox lstInv
|
||||
Height = 2205
|
||||
Left = 120
|
||||
Sorted = -1 'True
|
||||
TabIndex = 14
|
||||
Top = 2880
|
||||
Visible = 0 'False
|
||||
Width = 2955
|
||||
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 = 10020
|
||||
TabIndex = 13
|
||||
Top = 1740
|
||||
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 = 8400
|
||||
TabIndex = 11
|
||||
Top = 1740
|
||||
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 = 6780
|
||||
TabIndex = 12
|
||||
Top = 1740
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.CommandButton cmdFindInv
|
||||
Height = 435
|
||||
Left = 8700
|
||||
Picture = "frmInvPrice.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 8
|
||||
Top = 1245
|
||||
Visible = 0 'False
|
||||
Width = 435
|
||||
End
|
||||
Begin VB.TextBox txtPrice
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 7620
|
||||
MaxLength = 8
|
||||
TabIndex = 10
|
||||
Top = 1260
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.TextBox txtDesc
|
||||
Height = 315
|
||||
Left = 7620
|
||||
MaxLength = 30
|
||||
TabIndex = 9
|
||||
Top = 840
|
||||
Width = 3555
|
||||
End
|
||||
Begin VB.TextBox txtInvNo
|
||||
Height = 315
|
||||
Left = 7620
|
||||
MaxLength = 18
|
||||
TabIndex = 7
|
||||
Top = 420
|
||||
Width = 2625
|
||||
End
|
||||
Begin VB.ListBox lstInventory
|
||||
Height = 4740
|
||||
Left = 3240
|
||||
Sorted = -1 'True
|
||||
TabIndex = 2
|
||||
Top = 420
|
||||
Width = 3375
|
||||
End
|
||||
Begin VB.ListBox lstSupplier
|
||||
Height = 2400
|
||||
Left = 120
|
||||
Sorted = -1 'True
|
||||
TabIndex = 0
|
||||
Top = 420
|
||||
Width = 2955
|
||||
End
|
||||
Begin VB.Label lblPrice
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "VWP Cost:"
|
||||
Height = 195
|
||||
Left = 6735
|
||||
TabIndex = 6
|
||||
Top = 1320
|
||||
Width = 780
|
||||
End
|
||||
Begin VB.Label lblDesc
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Description:"
|
||||
Height = 195
|
||||
Left = 6675
|
||||
TabIndex = 5
|
||||
Top = 900
|
||||
Width = 840
|
||||
End
|
||||
Begin VB.Label lblInvNo
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Inventory #:"
|
||||
Height = 195
|
||||
Left = 6660
|
||||
TabIndex = 4
|
||||
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 = 3300
|
||||
TabIndex = 3
|
||||
Top = 120
|
||||
Width = 1815
|
||||
End
|
||||
Begin VB.Label lblSupplier
|
||||
Caption = "Supplier"
|
||||
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 = 180
|
||||
TabIndex = 1
|
||||
Top = 120
|
||||
Width = 1095
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmInvPrice"
|
||||
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
|
||||
|
||||
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, Price from tblInvPrice WHERE sup_no = " & lstSupplier.ItemData(lstSupplier.ListIndex)
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstInventory.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstInventory
|
||||
|
||||
strLine = oRS!inv_no & vbTab & Format$(Field2Str(oRS!price), "##,##0.00") & 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:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
Private Sub LoadSupplier()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
Dim strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblSupplier WHERE type <> 'A'"
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstSupplier.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstSupplier
|
||||
|
||||
strLine = oRS!Type & vbTab & oRS!supplier
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = oRS!sup_no
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstSupplier.ListCount Then
|
||||
lstSupplier.ListIndex = 0
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFindInv_Click()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, lngFind As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * from tblInvtry WHERE Inv_no = " & txtInvNo.Text
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
If oRS.RecordCount > 0 Then
|
||||
|
||||
With oRS
|
||||
|
||||
txtInvNo = Field2Str(!inv_no)
|
||||
txtDesc = Field2Str(!Desc)
|
||||
txtPrice.SetFocus
|
||||
|
||||
End With
|
||||
Else
|
||||
lstInv.Visible = True
|
||||
Call LoadMInventory
|
||||
lngFind = Field2Str(txtInvNo)
|
||||
' Call ListFindItem2(lstInv, lngFind) '*** need to FIX
|
||||
|
||||
End If
|
||||
oRS.Close
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub LoadMInventory()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
Dim strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT Inv_no, Desc from tblInvtry"
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstInv.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstInv
|
||||
|
||||
strLine = oRS!inv_no & vbTab & oRS!Desc
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = oRS!inv_no
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstInv.ListCount Then
|
||||
lstInv.ListIndex = -1
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvNo = ""
|
||||
txtDesc = ""
|
||||
txtPrice = ""
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblInvPrice WHERE Sup_no = " & lstSupplier.ItemData(lstSupplier.ListIndex) & " AND INV_NO = " & lstInventory.ItemData(lstInventory.ListIndex)
|
||||
|
||||
If moRSMat.State = adStateOpen Then
|
||||
moRSMat.Close
|
||||
End If
|
||||
|
||||
moRSMat.Open strSQL, goConn, _
|
||||
adOpenKeyset, adLockOptimistic
|
||||
|
||||
If moRSMat.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
moRSMat.Update
|
||||
Resume Next
|
||||
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()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSMat
|
||||
txtInvNo = Field2Str(!inv_no)
|
||||
txtDesc = Field2Str(!Desc)
|
||||
txtPrice = Format$(Field2Str(!price), "##,###.00")
|
||||
End With
|
||||
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
Private Sub FieldsSave()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSMat
|
||||
!inv_no = Str2Field(txtInvNo)
|
||||
!Desc = Str2Field(txtDesc)
|
||||
!price = Str2Field(txtPrice)
|
||||
!sup_no = lstSupplier.ItemData(lstSupplier.ListIndex)
|
||||
!l_update = Now()
|
||||
!LUUser = gstrLOGIN
|
||||
|
||||
End With
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAddInv_Click()
|
||||
cmdAddInv.Enabled = False
|
||||
cmdSaveInv.Enabled = True
|
||||
cmdDeleteInv.Enabled = False
|
||||
mboolAdding = True
|
||||
Call FormClear
|
||||
txtInvNo.SetFocus
|
||||
cmdFindInv.Visible = True
|
||||
|
||||
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 cmdPrint_Click()
|
||||
Dim strSQL As String, strMSG As String, strSql2 As String
|
||||
Dim oRS As Recordset, intResponse As Integer
|
||||
|
||||
strSQL = "SELECT * FROM tblInvPrice WHERE Sup_No = " & lstSupplier.ItemData(lstSupplier.ListIndex)
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
' intCount = oRS.RecordCount
|
||||
strSql2 = "{tblinvprice.sup_no} = " & lstSupplier.ItemData(lstSupplier.ListIndex)
|
||||
|
||||
strMSG = "Do you want to print to the Printer?" & vbLf & vbCr
|
||||
' strMSG = strMSG & intCount & " Checks did not match - Do You Want A Report"
|
||||
intResponse = MsgBox(strMSG, vbYesNo, "Print to Printer")
|
||||
gintCOPY = 1
|
||||
crInvList.ReportFileName = App.Path & "\InvListByVendor.rpt"
|
||||
crInvList.ReplaceSelectionFormula (strSql2)
|
||||
|
||||
If intResponse = vbYes Then
|
||||
crInvList.Destination = crptToPrinter
|
||||
Else
|
||||
crInvList.Destination = crptToWindow
|
||||
End If
|
||||
crInvList.CopiesToPrinter = gintCOPY
|
||||
crInvList.WindowState = crptMaximized
|
||||
crInvList.Action = 1
|
||||
crInvList.Reset
|
||||
' Else
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSaveInv_Click()
|
||||
cmdSaveInv.Enabled = False
|
||||
cmdDeleteInv.Enabled = False
|
||||
cmdAddInv.Enabled = True
|
||||
cmdFindInv.Visible = False
|
||||
Call FormSave
|
||||
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()
|
||||
Set moRSMat = New Recordset
|
||||
|
||||
Call LoadSupplier
|
||||
|
||||
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 lstInv_DblClick()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT Inv_no, Desc FROM tblInvtry where Inv_no = " & lstInv.ItemData(lstInv.ListIndex)
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
With oRS
|
||||
|
||||
txtInvNo = Field2Str(!inv_no)
|
||||
txtDesc = Field2Str(!Desc)
|
||||
End With
|
||||
|
||||
oRS.Close
|
||||
txtPrice.SetFocus
|
||||
lstInv.Visible = False
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
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:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstInventory_DblClick()
|
||||
cmdSaveInv.Enabled = True
|
||||
cmdDeleteInv.Enabled = True
|
||||
cmdAddInv.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub lstSupplier_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If lstSupplier.ListIndex <> -1 Then
|
||||
Call LoadInventory
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtDesc_GotFocus()
|
||||
Call FieldSelect(txtDesc)
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvNo_GotFocus()
|
||||
Call FieldSelect(txtInvNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPrice_GotFocus()
|
||||
Call FieldSelect(txtPrice)
|
||||
End Sub
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,927 @@
|
||||
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.fpCombo cboMType
|
||||
Height = 315
|
||||
Left = 4680
|
||||
TabIndex = 24
|
||||
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":0000
|
||||
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 = 23
|
||||
Top = 3000
|
||||
Visible = 0 'False
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.ComboBox cboInvType
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":02FE
|
||||
Left = 4680
|
||||
List = "frmInventory.frx":0311
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 22
|
||||
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 = 20
|
||||
Top = 1200
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.TextBox txtLength
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 4680
|
||||
TabIndex = 10
|
||||
Top = 2940
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.ComboBox cboMetal
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":0354
|
||||
Left = 4680
|
||||
List = "frmInventory.frx":035E
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 9
|
||||
Top = 2580
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.ComboBox cboDFlag
|
||||
Height = 315
|
||||
ItemData = "frmInventory.frx":036F
|
||||
Left = 4680
|
||||
List = "frmInventory.frx":0379
|
||||
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 = 14
|
||||
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 = 13
|
||||
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 = 11
|
||||
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 = 12
|
||||
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 = 18
|
||||
TabIndex = 4
|
||||
Top = 420
|
||||
Width = 2625
|
||||
End
|
||||
Begin LpLib.fpList lstInventory
|
||||
Height = 3210
|
||||
Left = 45
|
||||
TabIndex = 25
|
||||
Top = 360
|
||||
Width = 3360
|
||||
_Version = 196608
|
||||
_ExtentX = 5927
|
||||
_ExtentY = 5662
|
||||
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":038D
|
||||
End
|
||||
Begin VB.Label lblInvType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Inventory Type:"
|
||||
Height = 195
|
||||
Left = 3465
|
||||
TabIndex = 21
|
||||
Top = 120
|
||||
Width = 1110
|
||||
End
|
||||
Begin VB.Label lblLength
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Metal Length:"
|
||||
Height = 195
|
||||
Left = 3600
|
||||
TabIndex = 19
|
||||
Top = 3000
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.Label lblMetal
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Metal Flag:"
|
||||
Height = 195
|
||||
Left = 3795
|
||||
TabIndex = 18
|
||||
Top = 2640
|
||||
Width = 780
|
||||
End
|
||||
Begin VB.Label lblMType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Material Type:"
|
||||
Height = 195
|
||||
Left = 3570
|
||||
TabIndex = 17
|
||||
Top = 2280
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblDFlag
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Delivery Flag:"
|
||||
Height = 195
|
||||
Left = 3615
|
||||
TabIndex = 16
|
||||
Top = 1920
|
||||
Width = 960
|
||||
End
|
||||
Begin VB.Label lblTOCost
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Takeoff Cost:"
|
||||
Height = 195
|
||||
Left = 3615
|
||||
TabIndex = 15
|
||||
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
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblInvtry "
|
||||
strSQL = strSQL & "WHERE INV_NO = " & lstInventory.ItemData(lstInventory.ListIndex)
|
||||
strSQL = strSQL & " 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(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 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
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,697 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmPOInfo
|
||||
Caption = "Special PO Information"
|
||||
ClientHeight = 4875
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 9855
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4875
|
||||
ScaleWidth = 9855
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "E&xit"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 18
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 915
|
||||
Left = 8040
|
||||
TabIndex = 26
|
||||
Top = 3540
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.ListBox lstPOMaterial
|
||||
Height = 2595
|
||||
Left = 60
|
||||
TabIndex = 12
|
||||
Top = 2220
|
||||
Width = 3915
|
||||
End
|
||||
Begin VB.Label lblProjLot
|
||||
Alignment = 2 'Center
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 27
|
||||
Top = 0
|
||||
Width = 9675
|
||||
End
|
||||
Begin VB.Label lblD_MatPrice
|
||||
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 = 375
|
||||
Left = 5280
|
||||
TabIndex = 25
|
||||
Top = 4320
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.Label lblD_MType
|
||||
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 = 375
|
||||
Left = 5280
|
||||
TabIndex = 24
|
||||
Top = 3900
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.Label lblD_DType
|
||||
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 = 375
|
||||
Left = 5280
|
||||
TabIndex = 23
|
||||
Top = 3480
|
||||
Width = 1575
|
||||
End
|
||||
Begin VB.Label lblD_Qty
|
||||
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 = 375
|
||||
Left = 5280
|
||||
TabIndex = 22
|
||||
Top = 3060
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.Label lblD_Desc
|
||||
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 = 375
|
||||
Left = 5280
|
||||
TabIndex = 21
|
||||
Top = 2640
|
||||
Width = 4515
|
||||
End
|
||||
Begin VB.Label lblD_InvNo
|
||||
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 = 375
|
||||
Left = 5280
|
||||
TabIndex = 20
|
||||
Top = 2220
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.Label lblMatPrice
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Mat. Price:"
|
||||
Height = 195
|
||||
Left = 4410
|
||||
TabIndex = 19
|
||||
Top = 4380
|
||||
Width = 765
|
||||
End
|
||||
Begin VB.Label lblMType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Material Type:"
|
||||
Height = 195
|
||||
Left = 4170
|
||||
TabIndex = 18
|
||||
Top = 3960
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblDType
|
||||
Caption = "Delivery Type:"
|
||||
Height = 195
|
||||
Left = 4140
|
||||
TabIndex = 17
|
||||
Top = 3540
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.Label lblQty
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Quantity:"
|
||||
Height = 195
|
||||
Left = 4545
|
||||
TabIndex = 16
|
||||
Top = 3120
|
||||
Width = 630
|
||||
End
|
||||
Begin VB.Label lblDesc
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Description:"
|
||||
Height = 195
|
||||
Left = 4335
|
||||
TabIndex = 15
|
||||
Top = 2700
|
||||
Width = 840
|
||||
End
|
||||
Begin VB.Label lblInvNo
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Inv No:"
|
||||
Height = 195
|
||||
Left = 4650
|
||||
TabIndex = 14
|
||||
Top = 2280
|
||||
Width = 525
|
||||
End
|
||||
Begin VB.Label lblMaterial
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "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 = 195
|
||||
Left = 60
|
||||
TabIndex = 13
|
||||
Top = 1980
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Line Line1
|
||||
BorderWidth = 2
|
||||
X1 = 0
|
||||
X2 = 9840
|
||||
Y1 = 1920
|
||||
Y2 = 1920
|
||||
End
|
||||
Begin VB.Label lblD_Notes
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 1035
|
||||
Left = 6120
|
||||
TabIndex = 11
|
||||
Top = 780
|
||||
Width = 3735
|
||||
End
|
||||
Begin VB.Label lblD_PayYds
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 1680
|
||||
TabIndex = 10
|
||||
Top = 1500
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.Label lblD_PayDesc
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 1680
|
||||
TabIndex = 9
|
||||
Top = 1140
|
||||
Width = 3735
|
||||
End
|
||||
Begin VB.Label lblD_InvDesc
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 1680
|
||||
TabIndex = 8
|
||||
Top = 780
|
||||
Width = 3735
|
||||
End
|
||||
Begin VB.Label lblPayYds
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Pay Yards:"
|
||||
Height = 195
|
||||
Left = 870
|
||||
TabIndex = 7
|
||||
Top = 1560
|
||||
Width = 765
|
||||
End
|
||||
Begin VB.Label lblNotes
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Notes:"
|
||||
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 = 6120
|
||||
TabIndex = 6
|
||||
Top = 480
|
||||
Width = 570
|
||||
End
|
||||
Begin VB.Label lblPayDesc
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Pay Description:"
|
||||
Height = 195
|
||||
Left = 480
|
||||
TabIndex = 5
|
||||
Top = 1200
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.Label lblInvDesc
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Description:"
|
||||
Height = 195
|
||||
Left = 225
|
||||
TabIndex = 4
|
||||
Top = 840
|
||||
Width = 1410
|
||||
End
|
||||
Begin VB.Label lblPOType
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 3600
|
||||
TabIndex = 3
|
||||
Top = 420
|
||||
Width = 2475
|
||||
End
|
||||
Begin VB.Label lblPODate
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 2220
|
||||
TabIndex = 2
|
||||
Top = 420
|
||||
Width = 1320
|
||||
End
|
||||
Begin VB.Label lblPONum
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 1260
|
||||
TabIndex = 1
|
||||
Top = 420
|
||||
Width = 915
|
||||
End
|
||||
Begin VB.Label lblPOInfo
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "PO Information:"
|
||||
Height = 195
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 480
|
||||
Width = 1095
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmPOInfo"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Dim mboolSHOW As Boolean
|
||||
Dim moRSPO As Recordset, moRSPOMAT As Recordset
|
||||
|
||||
Private Function FormFindPO() As Boolean
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblPOrder "
|
||||
strSQL = strSQL & "WHERE ponum = " & gintPONUM
|
||||
|
||||
Set moRSPO = New Recordset
|
||||
|
||||
moRSPO.Open strSQL, goConn, _
|
||||
adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSPO.EOF Then
|
||||
FormFindPO = False
|
||||
Else
|
||||
FormFindPO = True
|
||||
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module FindPO"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Function FormFindPOMat() As Boolean
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblPOrdMat "
|
||||
strSQL = strSQL & "WHERE ponum = " & gintPONUM & " and Inv_No = " & lstPOMaterial.ItemData(lstPOMaterial.ListIndex)
|
||||
|
||||
Set moRSPOMAT = New Recordset
|
||||
|
||||
moRSPOMAT.Open strSQL, goConn, _
|
||||
adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSPOMAT.EOF Then
|
||||
FormFindPOMat = False
|
||||
Else
|
||||
FormFindPOMat = True
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module FormFindPOMat"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub FormShowPO()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSPO
|
||||
lblPONum = Field2Long(!ponum)
|
||||
lblD_InvDesc = Field2Str(!towhom)
|
||||
lblD_PayDesc = Field2Str(!Desc)
|
||||
lblD_Notes = Field2Str(!notes)
|
||||
lblPODate = Field2Str(!Date)
|
||||
lblD_PayYds = Field2Str2(!yards)
|
||||
gstrPO = Field2Str(!potype)
|
||||
End With
|
||||
|
||||
Select Case gstrPO
|
||||
Case "L"
|
||||
lblInvDesc = "Invoice Description:"
|
||||
lblD_InvDesc.Visible = True
|
||||
lblInvDesc.Visible = True
|
||||
lblPayDesc = "Pay Description:"
|
||||
lblD_PayDesc.Visible = True
|
||||
lblPayDesc.Visible = True
|
||||
lblPayYds = "Pay Yards:"
|
||||
lblD_PayYds.Visible = True
|
||||
lblPayYds.Visible = True
|
||||
lblPOType = "Lot Material"
|
||||
|
||||
Case "Y"
|
||||
lblInvDesc.Visible = False
|
||||
lblD_InvDesc.Visible = False
|
||||
lblPayDesc = "Supplier:"
|
||||
lblD_PayDesc.Visible = True
|
||||
lblPayYds.Visible = False
|
||||
lblD_PayYds.Visible = False
|
||||
lblPOType = "Yard Stock"
|
||||
|
||||
Case "V"
|
||||
lblInvDesc = "Mileage:"
|
||||
lblD_InvDesc.Visible = True
|
||||
lblPayDesc = "Supplier:"
|
||||
lblD_PayDesc.Visible = True
|
||||
lblPayYds.Visible = False
|
||||
lblD_PayYds.Visible = False
|
||||
lblPOType = "Vehicle/Equip."
|
||||
|
||||
Case "M"
|
||||
lblInvDesc = "Person Requesting:"
|
||||
lblD_InvDesc.Visible = True
|
||||
lblPayDesc = "Supplier:"
|
||||
lblD_PayDesc.Visible = True
|
||||
lblPayYds.Visible = False
|
||||
lblD_PayYds.Visible = False
|
||||
lblPOType = "Misc. Items"
|
||||
|
||||
End Select
|
||||
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module FormShowPO"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShowPOMat()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSPOMAT
|
||||
lblD_InvNo = Field2Long(!Inv_No)
|
||||
lblD_Desc = Field2Str(!Desc)
|
||||
lblD_Qty = Field2Str(!qty)
|
||||
|
||||
If !d_flag = "S" Then
|
||||
lblD_DType = "Supplier"
|
||||
Else
|
||||
lblD_DType = "Yard"
|
||||
End If
|
||||
|
||||
If !m_type = "L" Then
|
||||
lblD_MType = "Lath"
|
||||
ElseIf !m_type = "B" Then
|
||||
lblD_MType = "Brown"
|
||||
ElseIf !m_type = "S" Then
|
||||
lblD_MType = "Scratch"
|
||||
ElseIf !m_type = "T" Then
|
||||
lblD_MType = "Texture"
|
||||
ElseIf !m_type = "C" Then
|
||||
lblD_MType = "CMU"
|
||||
ElseIf !m_type = "P" Then
|
||||
lblD_MType = "PreOrder"
|
||||
End If
|
||||
|
||||
End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module FormShowPOMat"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub POMatLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, intINVNO As Integer
|
||||
Dim strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
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") & " " & oRS("M_Type") & " " & oRS("Qty") & vbTab & oRS("Inv_No") & vbTab & oRS("desc")
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = Field2Long(oRS("inv_no"))
|
||||
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstPOMaterial.ListCount Then
|
||||
lstPOMaterial.ListIndex = 0
|
||||
Else
|
||||
lblD_InvNo = ""
|
||||
lblD_Desc = ""
|
||||
lblD_Qty = ""
|
||||
lblD_DType = ""
|
||||
lblD_MType = ""
|
||||
lblD_MatPrice = ""
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module POMatLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If FormFindPO() Then
|
||||
Call FormShowPO
|
||||
Call POMatLoad
|
||||
If lstPOMaterial.ListIndex <> -1 Then
|
||||
If FormFindPOMat() Then
|
||||
Call FormShowPOMat
|
||||
Else
|
||||
lstPOMaterial.Clear
|
||||
lblD_InvNo = ""
|
||||
lblD_Desc = ""
|
||||
lblD_Qty = ""
|
||||
lblD_DType = ""
|
||||
lblD_MType = ""
|
||||
lblD_MatPrice = ""
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgBox "No PO Information Was Found -- Call Darv", vbOKOnly, "No PO Info"
|
||||
Unload Me
|
||||
End If
|
||||
|
||||
Call FindProjLot
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module Form_Load"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstPOMaterial_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If lstPOMaterial.ListIndex <> -1 Then
|
||||
If FormFindPOMat() Then
|
||||
Call FormShowPOMat
|
||||
Else
|
||||
lstPOMaterial.Clear
|
||||
lblD_InvNo = ""
|
||||
lblD_Desc = ""
|
||||
lblD_Qty = ""
|
||||
lblD_DType = ""
|
||||
lblD_MType = ""
|
||||
lblD_MatPrice = ""
|
||||
End If
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module lstPOMaterial_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FindProjLot()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblProject "
|
||||
strSQL = strSQL & "WHERE Proj_id = " & Field2Long(moRSPO!proj_id)
|
||||
' strSQL = strSQL & "WHERE Proj_id = " & Field2Integer(moRSPO!proj_id)
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If oRS.EOF Then
|
||||
Else
|
||||
lblProjLot = Trim$(Field2Str(oRS!proj_code)) & " " & Trim$(Field2Str(oRS!proj_desc))
|
||||
End If
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblLotInfo "
|
||||
strSQL = strSQL & "WHERE Lot_id = " & Field2Long(moRSPO!Lot_id)
|
||||
' strSQL = strSQL & "WHERE Lot_id = " & Field2Integer(moRSPO!Lot_id)
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If oRS.EOF Then
|
||||
|
||||
Else
|
||||
lblProjLot = lblProjLot & " -- " & Trim$(Field2Str(oRS!lot_no))
|
||||
End If
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblOrders "
|
||||
strSQL = strSQL & "WHERE ponum = " & gintPONUM
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If oRS.EOF Then
|
||||
lblProjLot = lblProjLot & " -- NO PO PRINTED"
|
||||
Else
|
||||
lblProjLot = lblProjLot & " -- " & Trim$(Field2Str(oRS!po_num))
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form POInfo - Module FindPO"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,454 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmLogin
|
||||
BorderStyle = 3 'Fixed Dialog
|
||||
Caption = "Login"
|
||||
ClientHeight = 1410
|
||||
ClientLeft = 1830
|
||||
ClientTop = 5040
|
||||
ClientWidth = 5805
|
||||
ClipControls = 0 'False
|
||||
ControlBox = 0 'False
|
||||
ForeColor = &H80000008&
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
MinButton = 0 'False
|
||||
PaletteMode = 1 'UseZOrder
|
||||
ScaleHeight = 1410
|
||||
ScaleWidth = 5805
|
||||
Begin VB.ComboBox cboNames
|
||||
Height = 300
|
||||
Left = 1200
|
||||
Sorted = -1 'True
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 3375
|
||||
End
|
||||
Begin VB.TextBox txtName
|
||||
Height = 300
|
||||
Left = 1200
|
||||
MaxLength = 20
|
||||
TabIndex = 6
|
||||
Top = 60
|
||||
Visible = 0 'False
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.CommandButton cmdOK
|
||||
Caption = "&OK"
|
||||
Default = -1 'True
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 4680
|
||||
TabIndex = 5
|
||||
Top = 120
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CommandButton cmdCancel
|
||||
Cancel = -1 'True
|
||||
Caption = "&Cancel"
|
||||
Height = 300
|
||||
Left = 4680
|
||||
TabIndex = 4
|
||||
Top = 540
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.TextBox txtPassword
|
||||
Height = 300
|
||||
IMEMode = 3 'DISABLE
|
||||
Left = 1200
|
||||
MaxLength = 20
|
||||
PasswordChar = "*"
|
||||
TabIndex = 1
|
||||
Top = 540
|
||||
Width = 3375
|
||||
End
|
||||
Begin VB.Label lblAppName
|
||||
Alignment = 2 'Center
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 120
|
||||
TabIndex = 7
|
||||
Top = 1020
|
||||
Width = 5595
|
||||
End
|
||||
Begin VB.Label lblUserID
|
||||
AutoSize = -1 'True
|
||||
BackStyle = 0 'Transparent
|
||||
Caption = "User ID"
|
||||
Height = 192
|
||||
Left = 120
|
||||
TabIndex = 2
|
||||
Top = 180
|
||||
Width = 540
|
||||
End
|
||||
Begin VB.Label lblPass
|
||||
AutoSize = -1 'True
|
||||
BackStyle = 0 'Transparent
|
||||
Caption = "Password"
|
||||
Height = 195
|
||||
Left = 120
|
||||
TabIndex = 3
|
||||
Top = 600
|
||||
Width = 690
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmLogin"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
'***************************************************************
|
||||
'* Author : Paul D. Sheriff
|
||||
'* Notice : Copyright 1995-1996 PDSA
|
||||
'* Part of the PDSA Toolset
|
||||
'* This version has been created specifically for
|
||||
'* inclusion in this courseware
|
||||
'* Date Created: December, 1995
|
||||
'* Form Name : s_login.frm
|
||||
'* Description :
|
||||
'*
|
||||
'* The PDSA Toolset is a generic application builder and
|
||||
'* set of templates for building Client/Server applications
|
||||
'* using Visual Basic.
|
||||
'* For more information on the PDSA Toolset browse our web
|
||||
'* page at http://www.pdsa.com for a complete feature list.
|
||||
'***************************************************************
|
||||
Option Explicit
|
||||
|
||||
Private mintTimesTried As Integer
|
||||
Private mboolCancel As Boolean
|
||||
Private mboolValidLogon As Boolean
|
||||
Private mboolDisplayUsers As Boolean
|
||||
Private mboolCheckUserTable As Boolean
|
||||
Private mstrInitLoginID As String
|
||||
Private mstrInitPassword As String
|
||||
Private mboolError As Boolean
|
||||
Private mstrAppName As String
|
||||
|
||||
Private mlngTop As Long
|
||||
Private mlngLeft As Long
|
||||
|
||||
Private mstrInfoMsg As String
|
||||
|
||||
' Connection Class
|
||||
'Private moDataConn As DataConnection
|
||||
|
||||
Property Get InfoMsg()
|
||||
InfoMsg = mstrInfoMsg
|
||||
End Property
|
||||
|
||||
Property Let AppName(ByVal strValue As String)
|
||||
mstrAppName = strValue
|
||||
End Property
|
||||
|
||||
Property Let InitTop(ByVal lngTop As Long)
|
||||
mlngTop = lngTop
|
||||
End Property
|
||||
|
||||
Property Let InitLeft(ByVal lngLeft As Long)
|
||||
mlngLeft = lngLeft
|
||||
End Property
|
||||
|
||||
Property Get DataConnection() As DataConnection
|
||||
Set DataConnection = moDataConn
|
||||
End Property
|
||||
|
||||
Property Set DataConnection(oConnect As DataConnection)
|
||||
Set moDataConn = oConnect
|
||||
End Property
|
||||
|
||||
Property Get DisplayUsers() As Boolean
|
||||
DisplayUsers = mboolDisplayUsers
|
||||
End Property
|
||||
|
||||
Property Let DisplayUsers(ByVal boolValue As Boolean)
|
||||
mboolDisplayUsers = boolValue
|
||||
End Property
|
||||
|
||||
Property Get CheckUserTable() As Boolean
|
||||
CheckUserTable = mboolCheckUserTable
|
||||
End Property
|
||||
|
||||
Property Let CheckUserTable(ByVal boolValue As Boolean)
|
||||
mboolCheckUserTable = boolValue
|
||||
End Property
|
||||
|
||||
Property Get Cancel() As Boolean
|
||||
Cancel = mboolCancel
|
||||
End Property
|
||||
|
||||
Property Get ValidLogon() As Boolean
|
||||
ValidLogon = mboolValidLogon
|
||||
End Property
|
||||
|
||||
Property Get InitLoginID() As String
|
||||
InitLoginID = mstrInitLoginID
|
||||
End Property
|
||||
|
||||
Property Let InitLoginID(ByVal strValue As String)
|
||||
mstrInitLoginID = strValue
|
||||
End Property
|
||||
|
||||
Property Get InitPassword() As String
|
||||
InitPassword = mstrInitPassword
|
||||
End Property
|
||||
|
||||
Property Let InitPassword(ByVal strValue As String)
|
||||
mstrInitPassword = strValue
|
||||
End Property
|
||||
|
||||
Property Let Password(ByVal strValue As String)
|
||||
mstrInitPassword = strValue
|
||||
End Property
|
||||
|
||||
Private Function UserNameLoad() As Boolean
|
||||
Dim strOldMsg As String
|
||||
Dim strLine As String
|
||||
Dim oUser As clsUsers
|
||||
Dim oConn As DataConnection
|
||||
|
||||
Set oConn = New DataConnection
|
||||
With oConn
|
||||
.DataSource = moDataConn.DataSource
|
||||
.Provider = moDataConn.Provider
|
||||
.ProviderConst = moDataConn.ProviderConst
|
||||
.DatabaseName = moDataConn.DatabaseName
|
||||
.DSN = moDataConn.DSN
|
||||
.InitialCatalog = moDataConn.InitialCatalog
|
||||
.UseODBC = moDataConn.UseODBC
|
||||
.LoginId = mstrInitLoginID
|
||||
.Password = mstrInitPassword
|
||||
End With
|
||||
|
||||
If oConn.DataOpen() Then
|
||||
Set oUser = New clsUsers
|
||||
With oUser
|
||||
Set .DataConnection = oConn
|
||||
.SelectFilter = dacSelectclsUsersAll
|
||||
|
||||
' Retrieve first record
|
||||
If .OpenRecordset() Then
|
||||
UserNameLoad = True
|
||||
cboNames.Clear
|
||||
|
||||
Do Until .EOF
|
||||
strLine = .LastName & ", "
|
||||
strLine = strLine & .FirstName & _
|
||||
Space$(100) & vbTab
|
||||
strLine = strLine & .LoginId
|
||||
|
||||
cboNames.AddItem strLine
|
||||
cboNames.ItemData(cboNames.NewIndex) = .userId
|
||||
|
||||
' Retrieve next record
|
||||
Call .MoveNext
|
||||
Loop
|
||||
Else
|
||||
mstrInfoMsg = oConn.ErrorMsg
|
||||
UserNameLoad = False
|
||||
End If
|
||||
.CloseRecordset
|
||||
End With
|
||||
Else
|
||||
mstrInfoMsg = oConn.ErrorMsg & vbCrLf & "Did you fill in the InitLoginID & InitPassword?"
|
||||
UserNameLoad = False
|
||||
End If
|
||||
oConn.DataClose
|
||||
End Function
|
||||
|
||||
Private Sub cboNames_Click()
|
||||
cmdOK.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub cmdCancel_Click()
|
||||
mstrInfoMsg = "User Cancelled Login Process"
|
||||
mboolCancel = True
|
||||
Me.Hide
|
||||
End Sub
|
||||
|
||||
Private Sub cmdOK_Click()
|
||||
Dim strLoginId As String
|
||||
Dim lngUserId As Long
|
||||
Dim strUserName As String
|
||||
Dim strPassword As String
|
||||
Dim boolPerform As Boolean
|
||||
|
||||
mintTimesTried = mintTimesTried + 1
|
||||
mboolCancel = False
|
||||
|
||||
' Did they fill in name and password correctly
|
||||
boolPerform = FormCheck()
|
||||
|
||||
If boolPerform Then
|
||||
' Get Password from Text Box
|
||||
strPassword = Trim$(txtPassword.Text)
|
||||
|
||||
' Set Properties of DataConnection Class
|
||||
If mboolDisplayUsers Then
|
||||
strLoginId = Trim$(cboNames.Text)
|
||||
strLoginId = Mid$(strLoginId, InStr(strLoginId, vbTab) + 1)
|
||||
strUserName = Trim$(Left$(cboNames.Text, InStr(cboNames.Text, vbTab) - 1))
|
||||
lngUserId = cboNames.ItemData(cboNames.ListIndex)
|
||||
Else
|
||||
strLoginId = Trim$(txtName.Text)
|
||||
strUserName = ""
|
||||
lngUserId = -1
|
||||
End If
|
||||
With moDataConn
|
||||
.LoginId = strLoginId
|
||||
.userName = strUserName
|
||||
.Password = strPassword
|
||||
.userId = lngUserId
|
||||
End With
|
||||
End If
|
||||
|
||||
If boolPerform Then
|
||||
boolPerform = moDataConn.DataOpen()
|
||||
If Not boolPerform Then
|
||||
MsgBox "Invalid User ID and/or Password" & vbCrLf & vbCrLf & moDataConn.ErrorMsg, , "PDSASecurity.Login"
|
||||
End If
|
||||
End If
|
||||
|
||||
If boolPerform Then
|
||||
If mboolCheckUserTable Then
|
||||
mboolValidLogon = UserTableCheck()
|
||||
If mboolValidLogon Then
|
||||
mboolValidLogon = True
|
||||
Unload Me
|
||||
Else
|
||||
MsgBox mstrInfoMsg, , "PDSASecurity.Login"
|
||||
End If
|
||||
Else
|
||||
' Nothing else to do, leave validation
|
||||
' for another routine.
|
||||
mboolValidLogon = True
|
||||
Unload Me
|
||||
End If
|
||||
Else
|
||||
If mintTimesTried > 2 Then
|
||||
MsgBox "Exceeded the number of tries to login", , "PDSASecurity.Login"
|
||||
Unload Me
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function UserTableCheck()
|
||||
Dim oUser As clsUsers
|
||||
|
||||
Set oUser = New clsUsers
|
||||
With oUser
|
||||
Set .DataConnection = moDataConn
|
||||
' Fill in Login ID so we can look them up in our
|
||||
' pdsaUser table. We will need to get their user
|
||||
' group for security, and their full name for
|
||||
' display on the screen.
|
||||
.LoginId = moDataConn.LoginId
|
||||
.WhereFilter = dacWherepdsaUsersLoginId
|
||||
If .Find() Then
|
||||
' NOTE: You might want to add some encryption here
|
||||
If .Password = moDataConn.Password Then
|
||||
moDataConn.GroupId = .GroupId
|
||||
moDataConn.userName = .LastName & ", " & .FirstName
|
||||
UserTableCheck = True
|
||||
Else
|
||||
mstrInfoMsg = "Password does not match the password in the Users Table"
|
||||
UserTableCheck = False
|
||||
End If
|
||||
Else
|
||||
If .InfoMsg <> "" Then
|
||||
mstrInfoMsg = .InfoMsg
|
||||
MsgBox mstrInfoMsg, , "PDSASecurity.Login"
|
||||
Else
|
||||
mstrInfoMsg = "Can't Find User ID in the pdsaUsers Table, please re-enter."
|
||||
MsgBox mstrInfoMsg, , "PDSASecurity.Login"
|
||||
End If
|
||||
|
||||
mboolValidLogon = False
|
||||
End If
|
||||
.CloseRecordset
|
||||
End With
|
||||
End Function
|
||||
|
||||
Private Sub Form_Activate()
|
||||
If mboolDisplayUsers Then
|
||||
cboNames.SetFocus
|
||||
Else
|
||||
If txtName.Text = "" Then
|
||||
txtName.SetFocus
|
||||
Else
|
||||
txtPassword.SetFocus
|
||||
End If
|
||||
End If
|
||||
If mboolError Then
|
||||
mboolValidLogon = False
|
||||
Unload Me
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Initialize()
|
||||
mlngTop = -1
|
||||
mlngLeft = -1
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Screen.MousePointer = vbHourglass
|
||||
|
||||
If mlngTop = -1 Then
|
||||
Me.Top = Screen.Height - Me.Height - 1000
|
||||
Else
|
||||
Me.Top = mlngTop
|
||||
End If
|
||||
If mlngLeft = -1 Then
|
||||
Me.Left = (Screen.Width / 2) - (Me.Width / 2)
|
||||
Else
|
||||
Me.Left = mlngLeft
|
||||
End If
|
||||
|
||||
lblAppName.caption = mstrAppName
|
||||
|
||||
mboolValidLogon = False
|
||||
If mboolDisplayUsers Then
|
||||
' Load Combo Box of Users
|
||||
If Not UserNameLoad() Then
|
||||
mboolError = True
|
||||
End If
|
||||
Else
|
||||
' Ask user for LoginID/Password
|
||||
cboNames.Visible = False
|
||||
With txtName
|
||||
.Top = cboNames.Top
|
||||
.Left = cboNames.Left
|
||||
.Width = cboNames.Width
|
||||
.Text = moDataConn.LoginId
|
||||
.Visible = True
|
||||
End With
|
||||
cboNames.Width = 0
|
||||
End If
|
||||
|
||||
Screen.MousePointer = vbDefault
|
||||
End Sub
|
||||
|
||||
Private Function FormCheck()
|
||||
Dim boolValid As Integer
|
||||
boolValid = True
|
||||
|
||||
If mboolDisplayUsers Then
|
||||
If Trim$(cboNames.Text) = "" Then
|
||||
MsgBox "Please Fill In Your User Name", , "PDSASecurity.Login"
|
||||
cboNames.SetFocus
|
||||
boolValid = False
|
||||
End If
|
||||
Else
|
||||
If Trim$(txtName.Text) = "" Then
|
||||
MsgBox "Please Fill In Your User Name", , "PDSASecurity.Login"
|
||||
txtName.SetFocus
|
||||
boolValid = False
|
||||
End If
|
||||
End If
|
||||
|
||||
FormCheck = boolValid
|
||||
End Function
|
||||
|
||||
Private Sub txtName_Change()
|
||||
cmdOK.Enabled = True
|
||||
End Sub
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,117 @@
|
||||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\WINDOWS\system32\stdole2.tlb#OLE Automation
|
||||
Reference=*\G{333C7BC1-460F-11D0-BC04-0080C7055A83}#1.1#0#..\..\WINDOWS\system32\tdc.ocx#Tabular Data Control 1.1 Type Library
|
||||
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\..\WINDOWS\system32\MSBIND.DLL#Microsoft Data Binding Collection
|
||||
Reference=*\G{00000201-0000-0010-8000-00AA006D2EA4}#2.1#0#..\..\Program Files\Common Files\system\ado\msado21.tlb#Microsoft ActiveX Data Objects 2.1 Library
|
||||
Reference=*\G{00000300-0000-0010-8000-00AA006D2EA4}#2.1#0#..\..\Program Files\Common Files\system\ado\msador15.dll#Microsoft ActiveX Data Objects Recordset 2.1 Library
|
||||
Reference=*\G{00000600-0000-0010-8000-00AA006D2EA4}#2.1#0#..\..\Program Files\Common Files\System\ado\msadox.dll#Microsoft ADO Ext. 2.1 for DDL and Security
|
||||
Reference=*\G{0A758DFA-C46A-4C1C-8057-C6C18375EE24}#1.0#0#..\..\WINDOWS\system32\tdbg7da.dll#True DBGrid Pro 7.0 Design Assistant
|
||||
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\..\WINDOWS\system32\msstdfmt.dll#Microsoft Data Formatting Object Library
|
||||
Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\..\WINDOWS\system32\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
|
||||
Reference=*\G{8C344710-5FEC-11CF-A0BF-00AA0062BE57}#1.0#0#..\..\Program Files\Common Files\designer\MSCDRUN.DLL#Microsoft Connection Designer Instance 1.0
|
||||
Reference=*\G{EE008642-64A8-11CE-920F-08002B369A33}#2.0#0#..\..\WINDOWS\system32\MSRDO20.DLL#Microsoft Remote Data Object 2.0
|
||||
Reference=*\G{B4741C00-45A6-11D1-ABEC-00A0C9274B91}#7.0#0#..\..\Program Files\Seagate Software\Crystal Reports\craxdrt.dll#Crystal Report 7 ActiveX Designer Run Time Library
|
||||
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
|
||||
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
|
||||
Object={DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0; todg7.ocx
|
||||
Object={00025600-0000-0000-C000-000000000046}#5.2#0; crystl32.ocx
|
||||
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
|
||||
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
|
||||
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
|
||||
Object={32B82FD1-3332-11D4-BF7C-E4453F764218}#1.0#0; EasyP.ocx
|
||||
Form=frmLotInfo.frm
|
||||
Form=frmMain.frm
|
||||
Form=frmPlans.frm
|
||||
Form=frmViewTake.frm
|
||||
Module=modADO; ADO.bas
|
||||
Form=frmError.frm
|
||||
Form=FrmLabor.FRM
|
||||
Form=frmBlackPaper.FRM
|
||||
Form=frmSupplier.frm
|
||||
Form=frmTexture.frm
|
||||
Form=frmContractor.frm
|
||||
Form=frmScaffold.frm
|
||||
Form=frmPayInput.frm
|
||||
Form=frmPrint.frm
|
||||
Form=frmAbout.frm
|
||||
Form=frmSplash.frm
|
||||
Form=frmLogin.frm
|
||||
Form=frmInvTake.frm
|
||||
Form=frmUser.frm
|
||||
Form=frmOrderDates.frm
|
||||
Form=frmChange.frm
|
||||
Form=frmYardOrder.frm
|
||||
Form=frmYInventory.frm
|
||||
Form=frmShowPO.frm
|
||||
Form=frmScafList.frm
|
||||
Form=frmLotList2.frm
|
||||
Form=frmRepairLot.frm
|
||||
Form=frmShowRepair.frm
|
||||
Form=frmPayroll.frm
|
||||
Form=frmPayHead.frm
|
||||
Form=frmHourList.frm
|
||||
Form=frmLotChLog.frm
|
||||
Form=frmPayList.frm
|
||||
Form=frmReport.frm
|
||||
Form=frmSCrew.frm
|
||||
Form=frmPOList.frm
|
||||
Form=frmInventory.frm
|
||||
Form=frmRepair.frm
|
||||
Form=frmRCrew.frm
|
||||
Form=frmBilling.frm
|
||||
Form=frmBillingStatus.frm
|
||||
Form=frmAR.frm
|
||||
Form=frmFoam.frm
|
||||
Form=frmProjNotes.frm
|
||||
Form=frmAck.frm
|
||||
Form=frmProject.frm
|
||||
Form=frmOrders.frm
|
||||
Form=frmPOInfo.frm
|
||||
Form=frmCrews.frm
|
||||
Form=frmElevPic.frm
|
||||
Form=frmEPElev.frm
|
||||
Form=frmShowYardMat.frm
|
||||
Form=frmShowOrderMat.frm
|
||||
Form=frmJCList.frm
|
||||
Form=frmRepList.frm
|
||||
Form=frmInvPrice.frm
|
||||
Form=frmCrewList.frm
|
||||
Form=frmSand.FRM
|
||||
Form=frmPaySheet.frm
|
||||
Form=frmScafPay.frm
|
||||
Form=frmGetPaySheet.frm
|
||||
Form=frmTake.frm
|
||||
IconForm="frmMain"
|
||||
Startup="Sub Main"
|
||||
HelpFile=""
|
||||
Title="ORDERS"
|
||||
ExeName32="ORDERS.exe"
|
||||
Command32=""
|
||||
Name="Orders"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=3
|
||||
MinorVer=7
|
||||
RevisionVer=5
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="Valley Wide Plastering"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
DebugStartupOption=0
|
||||
|
||||
[MS Transaction Server]
|
||||
AutoRefresh=1
|
||||
@@ -0,0 +1,139 @@
|
||||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\Windows\system32\stdole2.tlb#OLE Automation
|
||||
Reference=*\G{333C7BC1-460F-11D0-BC04-0080C7055A83}#1.1#0#..\..\Windows\System32\tdc.ocx#Tabular Data Control 1.1 Type Library
|
||||
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\..\Windows\system32\MSBIND.DLL#Microsoft Data Binding Collection
|
||||
Reference=*\G{0A758DFA-C46A-4C1C-8057-C6C18375EE24}#1.0#0#..\..\Windows\system32\tdbg7da.dll#True DBGrid Pro 7.0 Design Assistant
|
||||
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\..\Windows\system32\msstdfmt.dll#Microsoft Data Formatting Object Library
|
||||
Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\..\Windows\system32\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
|
||||
Reference=*\G{8C344710-5FEC-11CF-A0BF-00AA0062BE57}#1.0#0#..\..\Program Files\Common Files\designer\MSCDRUN.DLL#Microsoft Connection Designer Instance 1.0
|
||||
Reference=*\G{EE008642-64A8-11CE-920F-08002B369A33}#2.0#0#..\..\Windows\system32\msrdo20.dll#Microsoft Remote Data Object 2.0
|
||||
Reference=*\G{B4741C00-45A6-11D1-ABEC-00A0C9274B91}#7.0#0#..\..\Program Files\Seagate Software\Report Designer Component\craxdrt.dll#Crystal Report 7 ActiveX Designer Run Time Library
|
||||
Reference=*\G{00000600-0000-0010-8000-00AA006D2EA4}#6.0#0#..\..\Program Files\Common Files\System\ado\msadox.dll#Microsoft ADO Ext. 6.0 for DDL and Security
|
||||
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\Windows\system32\scrrun.dll#Microsoft Scripting Runtime
|
||||
Reference=*\G{00000206-0000-0010-8000-00AA006D2EA4}#2.6#0#..\..\Program Files\Common Files\System\ado\msado26.tlb#Microsoft ActiveX Data Objects 2.6 Library
|
||||
Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#4.0#0#..\..\Windows\system32\msxml4.dll#Microsoft XML, v4.0
|
||||
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
|
||||
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
|
||||
Object={DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0; todg7.ocx
|
||||
Object={00025600-0000-0000-C000-000000000046}#5.2#0; Crystl32.OCX
|
||||
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
|
||||
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
|
||||
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; mscomct2.ocx
|
||||
Object={32B82FD1-3332-11D4-BF7C-E4453F764218}#1.0#0; EasyP.ocx
|
||||
Object={8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0; Flp32a30.ocx
|
||||
Form=frmLotInfo.frm
|
||||
Form=frmMain.frm
|
||||
Form=frmPlans.frm
|
||||
Form=frmViewTake.frm
|
||||
Module=modADO; ADO.bas
|
||||
Form=frmError.frm
|
||||
Form=FrmLabor.FRM
|
||||
Form=frmBlackPaper.FRM
|
||||
Form=frmSupplier.frm
|
||||
Form=frmTexture.frm
|
||||
Form=frmContractor.frm
|
||||
Form=frmScaffold.frm
|
||||
Form=frmPayInput.frm
|
||||
Form=frmPrint.frm
|
||||
Form=frmAbout.frm
|
||||
Form=frmSplash.frm
|
||||
Form=frmLogin.frm
|
||||
Form=frmInvTake.frm
|
||||
Form=frmUser.frm
|
||||
Form=frmOrderDates.frm
|
||||
Form=frmChange.frm
|
||||
Form=frmYardOrder.frm
|
||||
Form=frmYInventory.frm
|
||||
Form=frmShowPO.frm
|
||||
Form=frmScafList.frm
|
||||
Form=frmLotList2.frm
|
||||
Form=frmRepairLot.frm
|
||||
Form=frmShowRepair.frm
|
||||
Form=frmPayroll.frm
|
||||
Form=frmPayHead.frm
|
||||
Form=frmHourList.frm
|
||||
Form=frmLotChLog.frm
|
||||
Form=frmPayList.frm
|
||||
Form=frmReport.frm
|
||||
Form=frmSCrew.frm
|
||||
Form=frmPOList.frm
|
||||
Form=frmInventory.frm
|
||||
Form=frmRepair.frm
|
||||
Form=frmRCrew.frm
|
||||
Form=frmBilling.frm
|
||||
Form=frmBillingStatus.frm
|
||||
Form=frmAR.frm
|
||||
Form=frmFoam.frm
|
||||
Form=frmProjNotes.frm
|
||||
Form=frmAck.frm
|
||||
Form=frmProject.frm
|
||||
Form=frmOrders.frm
|
||||
Form=frmPOInfo.frm
|
||||
Form=frmCrews.frm
|
||||
Form=frmShowYardMat.frm
|
||||
Form=frmShowOrderMat.frm
|
||||
Form=frmJCList.frm
|
||||
Form=frmRepList.frm
|
||||
Form=frmInvPrice.frm
|
||||
Form=frmCrewList.frm
|
||||
Form=frmSand.FRM
|
||||
Form=frmPaySheet.frm
|
||||
Form=frmScafPay.frm
|
||||
Form=frmGetPaySheet.frm
|
||||
Form=frmTake.frm
|
||||
Form=frmTake5.frm
|
||||
Form=frmLotInfo5.frm
|
||||
Form=frmLotPrtJobs.frm
|
||||
Form=frmPaintPrtJobs.frm
|
||||
Form=frmMANBILL.frm
|
||||
Form=frmLotInfoE.frm
|
||||
Form=frmTakeE.frm
|
||||
Form=frmPosPayS.frm
|
||||
Form=frmPosPayV.frm
|
||||
Form=frmAPFix.frm
|
||||
Form=frmARFix.frm
|
||||
Form=frmARMaster.frm
|
||||
Form=frmAPMaster.frm
|
||||
Form=frmProjList.frm
|
||||
Form=frmCertified.frm
|
||||
Form=frmEmployee.frm
|
||||
Form=frmPOWOLot.frm
|
||||
Form=frmWOList.frm
|
||||
Form=frmPosPayC.frm
|
||||
Object={CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0; MSDATGRD.OCX
|
||||
Form=frmCrewsOLD.frm
|
||||
Form=frmInvType.frm
|
||||
IconForm="frmMain"
|
||||
Startup="Sub Main"
|
||||
HelpFile=""
|
||||
Title="ORDERS"
|
||||
ExeName32="Orders02.exe"
|
||||
Command32=""
|
||||
Name="Orders_C"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=2020
|
||||
MinorVer=6
|
||||
RevisionVer=2
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="Valley Wide Plastering"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=-1
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
DebugStartupOption=0
|
||||
|
||||
[MS Transaction Server]
|
||||
AutoRefresh=1
|
||||
@@ -0,0 +1,81 @@
|
||||
frmLotInfo = 3, 5, 752, 322, , 110, 110, 843, 586, C
|
||||
frmMain = 46, -3, 779, 445, , 132, 132, 865, 608, C
|
||||
frmPlans = 0, 0, 733, 448, , -28, 29, 705, 477, C
|
||||
frmViewTake = 44, 44, 775, 492, C, 154, 154, 887, 602, C
|
||||
modADO = 61, 6, 905, 411, C
|
||||
frmError = 0, 0, 844, 405, C, 176, 176, 909, 624, C
|
||||
frmLabor = 44, 44, 888, 452, C, 198, 198, 931, 646, C
|
||||
frmBlackPaper = 154, 154, 1161, 576, C, 66, 66, 799, 542, C
|
||||
frmSupplier = 66, 66, 1044, 488, C, 0, 0, 733, 448, C
|
||||
frmTexture = 88, 88, 1095, 510, C, 22, 22, 755, 470, C
|
||||
frmContractor = 180, -9, 911, 439, C, 44, 44, 777, 492, C
|
||||
frmScaffold = 132, 132, 865, 580, C, 66, 66, 799, 514, C
|
||||
frmPayInput = 88, 88, 819, 536, C, 88, 88, 821, 536, C
|
||||
frmPrint = 66, 66, 799, 514, C, 88, 88, 821, 536, C
|
||||
frmAbout = 132, 132, 1110, 554, C, 44, 44, 777, 520, C
|
||||
frmSplash = 110, 110, 841, 558, C, 132, 132, 865, 580, C
|
||||
frmLogin = 66, 66, 799, 514, C, 154, 154, 887, 602, C
|
||||
frmInvTake = 110, 110, 841, 558, C, 88, 88, 821, 564, C
|
||||
frmUser = 22, 22, 753, 470, C, 198, 198, 931, 646, C
|
||||
frmOrderDates = 88, 88, 821, 536, , 220, 220, 953, 668, C
|
||||
frmChange = 22, 22, 866, 430, C, 0, 0, 733, 448, C
|
||||
frmYardOrder = 110, 110, 843, 558, C, 22, 22, 755, 470, C
|
||||
frmYInventory = 44, 44, 777, 492, C, 44, 44, 777, 492, C
|
||||
frmShowPO = 44, 44, 1051, 466, C, 66, 66, 799, 514, C
|
||||
frmScafList = 66, 66, 799, 514, C, 88, 88, 821, 536, C
|
||||
frmLotList = 154, 154, 885, 602, , 110, 110, 843, 558, C
|
||||
frmRepairLot = 198, 198, 931, 646, C, 132, 132, 865, 580, C
|
||||
frmShowRepair = 132, 132, 863, 580, C, 154, 154, 887, 602, C
|
||||
frmPayroll = 176, 176, 907, 624, C, 176, 176, 909, 624, C
|
||||
frmPayHead = 44, 44, 777, 492, , 198, 198, 931, 646, C
|
||||
frmHourList = 220, 220, 953, 668, Z, 220, 220, 953, 668, C
|
||||
frmLotChLog = 0, 0, 731, 448, C, 0, 0, 733, 448, C
|
||||
frmPayList = 22, 181, 755, 629, , 22, 22, 755, 470, C
|
||||
frmReport = 198, 198, 931, 646, C, 44, 44, 777, 492, C
|
||||
frmSCrew = 66, 66, 797, 514, C, 66, 66, 799, 514, C
|
||||
frmPOList = 88, 88, 819, 536, C, 88, 88, 821, 536, C
|
||||
frmInventory = 22, 22, 755, 470, C, 110, 110, 843, 558, C
|
||||
frmRepair = 154, 154, 887, 602, C, 132, 132, 865, 580, C
|
||||
frmRCrew = 132, 132, 1139, 554, C, 154, 154, 887, 602, C
|
||||
frmBilling = 198, 198, 931, 646, , 176, 176, 909, 624, C
|
||||
frmBillingStatus = 220, 220, 951, 668, C, 198, 198, 931, 646, C
|
||||
frmAR = 198, 198, 931, 646, C, 220, 220, 953, 668, C
|
||||
frmFoam = 176, 176, 909, 624, C, 0, 0, 733, 448, C
|
||||
frmProjNotes = 176, 176, 909, 624, C, 22, 22, 755, 470, C
|
||||
frmAck = 219, 138, 952, 586, C, 44, 44, 777, 492, C
|
||||
frmProject = 220, 220, 953, 668, , 66, 66, 799, 514, C
|
||||
frmOrders = 154, 154, 885, 602, , 88, 88, 821, 536, C
|
||||
frmPOInfo = 22, 22, 753, 470, C, 110, 110, 843, 558, C
|
||||
frmCrews = 132, 132, 865, 580, C, 132, 132, 865, 580, C
|
||||
frmShowYardMat = 88, 88, 1062, 510, C, 198, 198, 931, 646, C
|
||||
frmShowOrderMat = 110, 110, 1084, 532, C, 220, 220, 953, 668, C
|
||||
frmJCList = 44, -14, 777, 434, C, 0, 0, 733, 448, C
|
||||
frmRepList = 0, 0, 731, 448, C, 22, 22, 755, 470, C
|
||||
frmInvPrice = 0, 0, 1007, 422, C, 44, 44, 777, 492, C
|
||||
frmCrewList = 176, 176, 909, 624, , 66, 66, 799, 514, C
|
||||
frmSand = 66, 66, 1073, 488, C, 88, 88, 821, 536, C
|
||||
frmPaySheet = 44, 44, 775, 492, C, 140, 163, 873, 611, C
|
||||
frmScafPay = 88, 88, 821, 536, C, 132, 132, 865, 580, C
|
||||
frmGetPaySheet = 88, 88, 819, 536, C, 181, 131, 914, 579, C
|
||||
frmTake = 111, 210, 842, 658, , 0, 0, 731, 448, C
|
||||
frmTake5 = 88, 88, 819, 536, , 132, 132, 863, 580, C
|
||||
frmLotInfo5 = 0, 294, 1164, 632, , 132, 132, 863, 580, C
|
||||
frmLotPrtJobs = 44, 44, 1022, 466, C, 154, 154, 1132, 576, C
|
||||
frmPaintPrtJobs = 88, 88, 1066, 510, C, 66, 66, 1044, 488, C
|
||||
frmMANBILL = 22, 22, 996, 444, C, 110, 110, 1088, 532, C
|
||||
frmLotInfoE = 22, 22, 1000, 444, C, 132, 132, 1110, 554, C
|
||||
frmTakeE = 132, 132, 1108, 554, C, 154, 154, 1132, 576, C
|
||||
frmPosPayS = 0, 0, 0, 0, C, 176, 176, 1154, 598, C
|
||||
frmPosPayV = 44, 44, 1022, 466, C, 198, 198, 1176, 620, C
|
||||
frmAPFIX = 66, 66, 1044, 488, C, 0, 0, 978, 422, C
|
||||
frmARFIX = 88, 88, 1066, 510, C, 22, 22, 1000, 444, C
|
||||
frmARMaster = 110, 110, 1074, 532, C, 44, 44, 1022, 466, C
|
||||
frmAPMaster = 0, 0, 0, 0, C, 66, 66, 1044, 488, C
|
||||
frmProjList = 132, 132, 1106, 554, C, 88, 88, 1066, 510, C
|
||||
frmCertified = 0, 0, 0, 0, C, 66, 66, 1044, 488, C
|
||||
frmEmployee = 154, 154, 1132, 576, C, 132, 132, 1110, 554, C
|
||||
frmPOWOLot = 132, 132, 1110, 554, C, 110, 110, 1088, 532, C
|
||||
frmWOList = 154, 154, 1130, 576, C, 132, 132, 1108, 554, C
|
||||
frmPosPayC = 0, 0, 976, 422, C, 198, 198, 1174, 620, C
|
||||
frmCrewsOLD = 22, 22, 997, 444, C, 44, 44, 1019, 466, C
|
||||
frmInvType = 0, 0, 974, 422, C, 176, 176, 1150, 598, C
|
||||
@@ -0,0 +1,136 @@
|
||||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\Windows\system32\stdole2.tlb#OLE Automation
|
||||
Reference=*\G{333C7BC1-460F-11D0-BC04-0080C7055A83}#1.1#0#..\..\Windows\System32\tdc.ocx#Tabular Data Control 1.1 Type Library
|
||||
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\..\Windows\system32\MSBIND.DLL#Microsoft Data Binding Collection
|
||||
Reference=*\G{0A758DFA-C46A-4C1C-8057-C6C18375EE24}#1.0#0#..\..\Windows\system32\tdbg7da.dll#True DBGrid Pro 7.0 Design Assistant
|
||||
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\..\Windows\system32\msstdfmt.dll#Microsoft Data Formatting Object Library
|
||||
Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\..\Windows\system32\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
|
||||
Reference=*\G{8C344710-5FEC-11CF-A0BF-00AA0062BE57}#1.0#0#..\..\Program Files\Common Files\designer\MSCDRUN.DLL#Microsoft Connection Designer Instance 1.0
|
||||
Reference=*\G{EE008642-64A8-11CE-920F-08002B369A33}#2.0#0#..\..\Windows\system32\msrdo20.dll#Microsoft Remote Data Object 2.0
|
||||
Reference=*\G{B4741C00-45A6-11D1-ABEC-00A0C9274B91}#7.0#0#..\..\Program Files\Seagate Software\Report Designer Component\craxdrt.dll#Crystal Report 7 ActiveX Designer Run Time Library
|
||||
Reference=*\G{00000600-0000-0010-8000-00AA006D2EA4}#6.0#0#..\..\Program Files\Common Files\System\ado\msadox.dll#Microsoft ADO Ext. 6.0 for DDL and Security
|
||||
Reference=*\G{420B2830-E718-11CF-893D-00A0C9054228}#1.0#0#..\..\Windows\system32\scrrun.dll#Microsoft Scripting Runtime
|
||||
Reference=*\G{00000206-0000-0010-8000-00AA006D2EA4}#2.6#0#..\..\Program Files\Common Files\System\ado\msado26.tlb#Microsoft ActiveX Data Objects 2.6 Library
|
||||
Reference=*\G{F5078F18-C551-11D3-89B9-0000F81FE221}#4.0#0#..\..\Windows\system32\msxml4.dll#Microsoft XML, v4.0
|
||||
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
|
||||
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
|
||||
Object={DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0; todg7.ocx
|
||||
Object={00025600-0000-0000-C000-000000000046}#5.2#0; Crystl32.OCX
|
||||
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
|
||||
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx
|
||||
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; mscomct2.ocx
|
||||
Object={32B82FD1-3332-11D4-BF7C-E4453F764218}#1.0#0; EasyP.ocx
|
||||
Object={8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0; Flp32a30.ocx
|
||||
Form=frmLotInfo.frm
|
||||
Form=frmMain.frm
|
||||
Form=frmPlans.frm
|
||||
Form=frmViewTake.frm
|
||||
Module=modADO; ADO.bas
|
||||
Form=frmError.frm
|
||||
Form=FrmLabor.FRM
|
||||
Form=frmBlackPaper.FRM
|
||||
Form=frmSupplier.frm
|
||||
Form=frmTexture.frm
|
||||
Form=frmContractor.frm
|
||||
Form=frmScaffold.frm
|
||||
Form=frmPayInput.frm
|
||||
Form=frmPrint.frm
|
||||
Form=frmAbout.frm
|
||||
Form=frmSplash.frm
|
||||
Form=frmLogin.frm
|
||||
Form=frmInvTake.frm
|
||||
Form=frmUser.frm
|
||||
Form=frmOrderDates.frm
|
||||
Form=frmChange.frm
|
||||
Form=frmYardOrder.frm
|
||||
Form=frmYInventory.frm
|
||||
Form=frmShowPO.frm
|
||||
Form=frmScafList.frm
|
||||
Form=frmLotList2.frm
|
||||
Form=frmRepairLot.frm
|
||||
Form=frmShowRepair.frm
|
||||
Form=frmPayroll.frm
|
||||
Form=frmPayHead.frm
|
||||
Form=frmHourList.frm
|
||||
Form=frmLotChLog.frm
|
||||
Form=frmPayList.frm
|
||||
Form=frmReport.frm
|
||||
Form=frmSCrew.frm
|
||||
Form=frmPOList.frm
|
||||
Form=frmInventory.frm
|
||||
Form=frmRepair.frm
|
||||
Form=frmRCrew.frm
|
||||
Form=frmBilling.frm
|
||||
Form=frmBillingStatus.frm
|
||||
Form=frmAR.frm
|
||||
Form=frmFoam.frm
|
||||
Form=frmProjNotes.frm
|
||||
Form=frmAck.frm
|
||||
Form=frmProject.frm
|
||||
Form=frmOrders.frm
|
||||
Form=frmPOInfo.frm
|
||||
Form=frmCrews.frm
|
||||
Form=frmShowYardMat.frm
|
||||
Form=frmShowOrderMat.frm
|
||||
Form=frmJCList.frm
|
||||
Form=frmRepList.frm
|
||||
Form=frmInvPrice.frm
|
||||
Form=frmCrewList.frm
|
||||
Form=frmSand.FRM
|
||||
Form=frmPaySheet.frm
|
||||
Form=frmScafPay.frm
|
||||
Form=frmGetPaySheet.frm
|
||||
Form=frmTake.frm
|
||||
Form=frmTake5.frm
|
||||
Form=frmLotInfo5.frm
|
||||
Form=frmLotPrtJobs.frm
|
||||
Form=frmPaintPrtJobs.frm
|
||||
Form=frmMANBILL.frm
|
||||
Form=frmLotInfoE.frm
|
||||
Form=frmTakeE.frm
|
||||
Form=frmPosPayS.frm
|
||||
Form=frmPosPayV.frm
|
||||
Form=frmAPFix.frm
|
||||
Form=frmARFix.frm
|
||||
Form=frmARMaster.frm
|
||||
Form=frmAPMaster.frm
|
||||
Form=frmProjList.frm
|
||||
Form=frmCertified.frm
|
||||
Form=frmEmployee.frm
|
||||
Form=frmPOWOLot.frm
|
||||
Form=frmWOList.frm
|
||||
Form=frmPosPayC.frm
|
||||
IconForm="frmMain"
|
||||
Startup="Sub Main"
|
||||
HelpFile=""
|
||||
Title="ORDERS"
|
||||
ExeName32="ORDERS10.exe"
|
||||
Command32=""
|
||||
Name="Orders_C"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=18
|
||||
MinorVer=12
|
||||
RevisionVer=10
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="Valley Wide Plastering"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
DebugStartupOption=0
|
||||
|
||||
[MS Transaction Server]
|
||||
AutoRefresh=1
|
||||
@@ -0,0 +1,109 @@
|
||||
Type=Exe
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\SYSTEM\STDOLE2.TLB#OLE Automation
|
||||
Reference=*\G{333C7BC1-460F-11D0-BC04-0080C7055A83}#1.1#0#..\..\..\..\WINDOWS\SYSTEM\TDC.OCX#Tabular Data Control 1.1 Type Library
|
||||
Reference=*\G{56BF9020-7A2F-11D0-9482-00A0C91110ED}#1.0#0#..\..\..\..\WINDOWS\SYSTEM\MSBIND.DLL#Microsoft Data Binding Collection
|
||||
Reference=*\G{00000201-0000-0010-8000-00AA006D2EA4}#2.1#0#..\..\..\COMMON FILES\SYSTEM\ADO\msado21.tlb#Microsoft ActiveX Data Objects 2.1 Library
|
||||
Reference=*\G{00000300-0000-0010-8000-00AA006D2EA4}#2.1#0#..\..\..\COMMON FILES\SYSTEM\ADO\MSADOR15.DLL#Microsoft ActiveX Data Objects Recordset 2.1 Library
|
||||
Reference=*\G{00000600-0000-0010-8000-00AA006D2EA4}#2.1#0#..\..\..\COMMON FILES\SYSTEM\ADO\MSADOX.DLL#Microsoft ADO Ext. 2.1 for DDL and Security
|
||||
Reference=*\G{0A758DFA-C46A-4C1C-8057-C6C18375EE24}#1.0#0#..\..\..\..\WINDOWS\SYSTEM\TDBG7DA.DLL#True DBGrid Pro 7.0 Design Assistant
|
||||
Reference=*\G{6B263850-900B-11D0-9484-00A0C91110ED}#1.0#0#..\..\..\..\WINDOWS\SYSTEM\MSSTDFMT.DLL#Microsoft Data Formatting Object Library
|
||||
Reference=*\G{642AC760-AAB4-11D0-8494-00A0C90DC8A9}#1.0#0#..\..\..\..\WINDOWS\SYSTEM\MSDBRPTR.DLL#Microsoft Data Report Designer v6.0
|
||||
Reference=*\G{8C344710-5FEC-11CF-A0BF-00AA0062BE57}#1.0#0#..\..\..\COMMON FILES\DESIGNER\MSCDRUN.DLL#Microsoft Connection Designer Instance 1.0
|
||||
Reference=*\G{EE008642-64A8-11CE-920F-08002B369A33}#2.0#0#..\..\..\..\WINDOWS\SYSTEM\MSRDO20.DLL#Microsoft Remote Data Object 2.0
|
||||
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; TABCTL32.OCX
|
||||
Object={67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0; MSADODC.OCX
|
||||
Object={DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0; TODG7.OCX
|
||||
Object={00025600-0000-0000-C000-000000000046}#5.2#0; CRYSTL32.OCX
|
||||
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
|
||||
Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; COMDLG32.OCX
|
||||
Object={86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCT2.OCX
|
||||
Reference=*\G{B4741C00-45A6-11D1-ABEC-00A0C9274B91}#7.0#0#..\..\..\SEAGATE SOFTWARE\CRYSTAL REPORTS\CRAXDRT.DLL#Crystal Report 7 ActiveX Designer Run Time Library
|
||||
Form=frmLotInfo.frm
|
||||
Form=frmMain.frm
|
||||
Form=frmPlans.frm
|
||||
Form=frmTake.frm
|
||||
Module=modADO; ADO.bas
|
||||
Form=frmError.frm
|
||||
Form=FRMLABOR.FRM
|
||||
Form=frmBlackPaper.FRM
|
||||
Form=frmSupplier.frm
|
||||
Form=frmTexture1.frm
|
||||
Form=frmContractor.frm
|
||||
Form=frmInventory.frm
|
||||
Form=frmScaffold.frm
|
||||
Form=frmPayInput.frm
|
||||
Form=frmPrint.frm
|
||||
Form=frmAbout.frm
|
||||
Form=frmSplash.frm
|
||||
Form=Frmlogin.frm
|
||||
Form=frmInvTake.frm
|
||||
Form=frmUser.frm
|
||||
Form=frmOrderDates.frm
|
||||
Form=frmChange.frm
|
||||
Form=frmYardOrder.frm
|
||||
Form=frmInventory2.frm
|
||||
Form=frmShowPO.frm
|
||||
Form=frmScafList.frm
|
||||
Form=frmLotList2.frm
|
||||
Form=frmRepairLot.frm
|
||||
Form=frmShowRepair.frm
|
||||
Form=frmPayroll.frm
|
||||
Form=frmPayHead.frm
|
||||
Form=frmCrewList.frm
|
||||
Form=frmLotChLog.frm
|
||||
Form=frmPayList.frm
|
||||
Form=frmReport.frm
|
||||
Form=frmSCrew.frm
|
||||
Form=frmPOList.frm
|
||||
Form=frmInventory.frm
|
||||
Form=frmRepair.frm
|
||||
Form=frmRCrew.frm
|
||||
Form=frmBilling.frm
|
||||
Form=frmBillingStatus.frm
|
||||
Form=frmAR.frm
|
||||
Form=frmFoam.frm
|
||||
Form=frmProjNotes.frm
|
||||
Form=frmAck.frm
|
||||
Form=frmProject.frm
|
||||
Object={32B82FD1-3332-11D4-BF7C-E4453F764218}#1.0#0; EASYP.OCX
|
||||
Form=frmOrders.frm
|
||||
Form=frmPOInfo.frm
|
||||
Form=frmCrews.frm
|
||||
Form=frmElevPic.frm
|
||||
Form=frmEPElev.frm
|
||||
Form=frmShowYardMat.frm
|
||||
Form=frmShowOrderMat.frm
|
||||
Form=frmJCList.frm
|
||||
Form=frmRepList.frm
|
||||
Form=frmInvPrice.frm
|
||||
IconForm="frmMain"
|
||||
Startup="Sub Main"
|
||||
HelpFile=""
|
||||
Title="ORDERS"
|
||||
ExeName32="ORDERS.exe"
|
||||
Command32=""
|
||||
Name="Orders"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=2
|
||||
MinorVer=9
|
||||
RevisionVer=0
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="Valley Wide Plastering"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
||||
DebugStartupOption=0
|
||||
@@ -0,0 +1,14 @@
|
||||
Attribute VB_Name = "modDb"
|
||||
Option Explicit
|
||||
|
||||
Public gdb As Database
|
||||
Public gstrDatabase As String
|
||||
|
||||
Public Function DataOpen() As Boolean
|
||||
gstrDatabase = "..\Employees.mdb"
|
||||
|
||||
Set gdb = DBEngine.Workspaces(0).OpenDatabase(gstrDatabase)
|
||||
DataOpen = True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -0,0 +1,908 @@
|
||||
VERSION 5.00
|
||||
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 frmAPFIX
|
||||
Caption = "Accounts Payable Correction Screen"
|
||||
ClientHeight = 5310
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8880
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5310
|
||||
ScaleWidth = 8880
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "Print List W/ No JC#"
|
||||
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 = 6285
|
||||
TabIndex = 14
|
||||
Top = 4215
|
||||
Width = 1275
|
||||
End
|
||||
Begin LpLib.fpCombo cboAPCode
|
||||
Height = 315
|
||||
Left = 4830
|
||||
TabIndex = 12
|
||||
Top = 150
|
||||
Width = 4035
|
||||
_Version = 196608
|
||||
_ExtentX = 7117
|
||||
_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 = ""
|
||||
Columns = 3
|
||||
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 = 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 = "frmAPFix.frx":0000
|
||||
End
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 4560
|
||||
Left = 30
|
||||
TabIndex = 11
|
||||
Top = 615
|
||||
Width = 6195
|
||||
_Version = 196608
|
||||
_ExtentX = 10927
|
||||
_ExtentY = 8043
|
||||
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 = 7
|
||||
Sorted = 2
|
||||
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= 300
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmAPFix.frx":0447
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 165
|
||||
Top = 60
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "E&xit"
|
||||
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 = 6285
|
||||
TabIndex = 10
|
||||
Top = 4755
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 7590
|
||||
TabIndex = 9
|
||||
Top = 4755
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox txtItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 10
|
||||
TabIndex = 4
|
||||
Top = 1980
|
||||
Visible = 0 'False
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 7
|
||||
TabIndex = 3
|
||||
Top = 1560
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtDueDate
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 10
|
||||
TabIndex = 2
|
||||
Top = 1140
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtInvDate
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 10
|
||||
TabIndex = 1
|
||||
Top = 720
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.Label lblLOAD
|
||||
Alignment = 2 'Center
|
||||
BackColor = &H00C0FFFF&
|
||||
Caption = "Loading Invoices -- Patience"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 13.5
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
ForeColor = &H000000FF&
|
||||
Height = 750
|
||||
Left = 6435
|
||||
TabIndex = 13
|
||||
Top = 3420
|
||||
Visible = 0 'False
|
||||
Width = 2430
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Amount:"
|
||||
Height = 195
|
||||
Left = 6390
|
||||
TabIndex = 8
|
||||
Top = 1650
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Item Amount:"
|
||||
Height = 195
|
||||
Left = 6630
|
||||
TabIndex = 7
|
||||
Top = 2085
|
||||
Visible = 0 'False
|
||||
Width = 930
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Job Cost Number:"
|
||||
Height = 195
|
||||
Left = 6285
|
||||
TabIndex = 6
|
||||
Top = 1245
|
||||
Width = 1260
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice #:"
|
||||
Height = 195
|
||||
Left = 6825
|
||||
TabIndex = 5
|
||||
Top = 810
|
||||
Width = 720
|
||||
End
|
||||
Begin VB.Label lblARCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Vendor's CMS AP Code:"
|
||||
Height = 195
|
||||
Left = 2970
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 1815
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmAPFIX"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSHeader As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strVend As String
|
||||
'Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
' strTYPE = Trim(Left(cboARCode, 7))
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt from tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
lblLOAD.Visible = True
|
||||
DoEvents
|
||||
If cboAPCode.ListIndex = -1 Then
|
||||
strSQL = "SELECT * FROM APH_JobDistDetail " 'WHERE vendornumber = '" & strVend & "'" ' and not done"
|
||||
Else
|
||||
cboAPCode.col = 1
|
||||
strVend = cboAPCode.ColText
|
||||
' strSQL = "SELECT * FROM APH_JobDistDetail ORDER BY VendorNumber and InvoiceNumber" 'WHERE shipped and header and customer_no = '" & strVend & "' and not done"
|
||||
strSQL = "SELECT * FROM APH_JobDistDetail WHERE vendornumber = '" & strVend & "'" ' and not done"
|
||||
End If
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
' strTYPE = oRS.RecordCount
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
strLine = Field2Str2(oRS!AP_ID) & vbTab & Field2Str(oRS!VendorNumber) & vbTab '& Field2Str(oRS!Name) & vbTab
|
||||
strLine = strLine & Field2Str(oRS!InvoiceNumber) & vbTab & Field2Str(oRS!JobNumber) & vbTab
|
||||
strLine = strLine & Format(Field2Str2(oRS!distributionamount), "Currency") & vbTab & Format(Field2Str(oRS!InvoiceDate), "MM/DD/YYYY") & vbTab & Format(Field2Str(oRS!InvoiceDate), "YYYYMMDD")
|
||||
.AddItem strLine
|
||||
' .ItemData(.NewIndex) = oRS!Trans_ID
|
||||
' .ItemData(.NewIndex) = oRS!Lot_id
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
gintLOTID = 0
|
||||
lstHeader.ListIndex = -1
|
||||
' cmdPrint.Enabled = False
|
||||
End If
|
||||
lblLOAD.Visible = False
|
||||
DoEvents
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Repair - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cboAPCode_Click()
|
||||
lstHeader.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String, strCUST As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
cboAPCode.col = 1
|
||||
strCUST = cboAPCode.ColText
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT * FROM APH_JobDistDetail WHERE VendorNumber = '" & strCUST & "'"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
' gstrPONUM = Field2Str(oRS!po_num)
|
||||
' mstrPROJLOT = Field2Str(oRS!ProjLot)
|
||||
' Call LotChange(mstrPROJLOT, "RePrint AR Invoice")
|
||||
|
||||
strSELECT = "{APH_JobDistDetail.VendorNumber}= '" & strCUST & "' and {APH_JobDistDetail.JobNumber} = ''"
|
||||
' strSELECT = "{tblARInvoice.invoice_no}='" & mstrINV & "'"
|
||||
crAR.ReportFileName = App.Path & "\apblankJC.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
' crAR.CopiesToPrinter = gintCOPY
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
' crar.Destination = crptToPrinter
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARFix - Module Print"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
' Call DataHasChanged
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSProj.State = adStateOpen Then
|
||||
moRSProj.Close
|
||||
End If
|
||||
If moRSHeader.State = adStateOpen Then
|
||||
moRSHeader.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
' mintBOOKMARK = lstDetail.ListIndex
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
' lstDetail.Enabled = True
|
||||
' lstDetail.ListIndex = mintBOOKMARK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call APCodeLoad
|
||||
' Call HeaderLoad
|
||||
End Sub
|
||||
'Private Sub ProjLoad()
|
||||
'Dim strSQL As String
|
||||
' On Error GoTo Error_EH
|
||||
|
||||
' strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID
|
||||
|
||||
' Set moRSProj = New Recordset
|
||||
' moRSProj.Open strSQL, goConn, _
|
||||
' adOpenForwardOnly, adLockReadOnly
|
||||
' Exit Sub
|
||||
|
||||
'Error_EH:
|
||||
' gstrMODULE = "Form APFix - Module ProjLoad"
|
||||
' Call ErrorHandler2
|
||||
' gstrMODULE = ""
|
||||
' Exit Sub
|
||||
'End Sub
|
||||
Private Sub APCodeLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, intRows As Integer, strLine As String
|
||||
Dim row, col As Long
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblAPMaster"
|
||||
' strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
Do Until oRS.EOF
|
||||
strLine = Field2Str2(oRS!Bill_ID) & vbTab & Field2Str(oRS!Cust_NO) & vbTab & Field2Str(oRS!Name) ' & vbTab & Field2Str(oRS!Name) & vbTab & Field2Str(oRS!Name) & vbTab & Field2Str(oRS!Name)
|
||||
cboAPCode.AddItem strLine
|
||||
' cboARCode.ItemData(cboARCode.NewIndex) = Field2Long(oRS!bill_id)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
' cboAPCode.ListIndex = 0
|
||||
cboAPCode.ListIndex = -1
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module APCodeLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
' With moRSDetail
|
||||
' txtInvDate = Field2Str(!invoice_date)
|
||||
' txtDueDate = Field2Str(!inv_due_date)
|
||||
' txtItemAmt = Format(Field2Str2(!amount), "currency")
|
||||
' txtSalesCode = Field2Str(!sales_code)
|
||||
' txtTax = Field2Str(!taxcode)
|
||||
' chkReady = Field2CheckBox(!ready)
|
||||
' End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FormSave"
|
||||
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 tblARInvoice "
|
||||
' strSQL = strSQL & "WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
' Set moRSDetail = New Recordset
|
||||
' moRSDetail.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSHeader.EOF Then
|
||||
FormFind = False
|
||||
Call FormClear
|
||||
Else
|
||||
FormFind = True
|
||||
msglInvTotal = moRSHeader!non_tax_amt
|
||||
mstrType = moRSHeader!inv_type
|
||||
' gintPROJID = moRSHeader!proj_id
|
||||
' Call ProjLoad
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstDetail_Click()
|
||||
' If lstDetail.ListIndex <> -1 Then
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSHeader
|
||||
' !invoice_date = Str2Field(txtInvDate)
|
||||
!JobNumber = Str2Field(txtDueDate)
|
||||
' !price = Str2Field(txtItemAmt)
|
||||
' !amount = Str2Field(txtItemAmt)
|
||||
' !sales_code = Str2Field(txtSalesCode)
|
||||
.Update
|
||||
End With
|
||||
|
||||
' strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID & " and not done"
|
||||
' Set oRS = New Recordset
|
||||
' oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
' msglInvTotal = Field2Str2(oRS!sglTOTAL)
|
||||
|
||||
' strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
' Set oRS = New Recordset
|
||||
' oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
' Do Until oRS.EOF
|
||||
' With oRS
|
||||
' !invoice_date = Str2Field(txtInvDate)
|
||||
' !inv_due_date = Str2Field(txtDueDate)
|
||||
' !ready = chkReady
|
||||
' !non_tax_amt = msglInvTotal
|
||||
' !taxcode = Str2Field(txtTax)
|
||||
' If Field2Str2(moRSProj!retention) > 0 Then
|
||||
' !retention_amt = Format(((msglInvTotal * Field2Str2(moRSProj!retention) / 100)), "#.00")
|
||||
' Else
|
||||
' !retention_amt = 0
|
||||
' End If
|
||||
' .Update
|
||||
' End With
|
||||
' oRS.MoveNext
|
||||
' Loop
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
' If lstHeader.ListCount = 0 Then
|
||||
' intResponse = MsgBox("No Invoices For This Builder - Select A Different Builder.", vbExclamation + vbOKOnly, "Exit Form")
|
||||
' Unload Me
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvDate = ""
|
||||
txtDueDate = ""
|
||||
txtSalesCode = ""
|
||||
txtItemAmt = ""
|
||||
' chkReady = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Sub lstDetail_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
Dim strSQL As String, oRS As Recordset
|
||||
Dim strID As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
lstHeader.col = 0
|
||||
strID = lstHeader.ColText
|
||||
strSQL = "SELECT * FROM APH_JobDistDetail WHERE ap_id = " & strID
|
||||
Set moRSHeader = New Recordset
|
||||
moRSHeader.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
||||
|
||||
If Not moRSHeader.EOF Then
|
||||
txtSalesCode = Format(Field2Str(moRSHeader!distributionamount), "#,#.00")
|
||||
txtDueDate = Field2Str(moRSHeader!JobNumber)
|
||||
txtInvDate = Field2Str(moRSHeader!InvoiceNumber)
|
||||
Else
|
||||
txtSalesCode = ""
|
||||
txtDueDate = ""
|
||||
txtInvDate = ""
|
||||
End If
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module lstHeader_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
txtDueDate.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_GotFocus()
|
||||
Call FieldSelect(txtDueDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
' lngPOS = InStr(1, txtDueDate, "/", 1)
|
||||
' If lngPOS = 0 Then
|
||||
' If Len(txtDueDate) > 0 Then
|
||||
' txtDueDate = Format(txtDueDate, "00/00/####")
|
||||
' If Not IsDate(txtDueDate) Then
|
||||
' MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
' txtDueDate.SetFocus
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf IsDate(txtDueDate) Then
|
||||
' Exit Sub
|
||||
' Else
|
||||
' MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
' txtDueDate.SetFocus
|
||||
' End If
|
||||
txtDueDate = UCase(txtDueDate)
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub txtInvDate_GotFocus()
|
||||
' Call FieldSelect(txtInvDate)
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtInvDate_LostFocus()
|
||||
'Dim lngPOS As Long
|
||||
|
||||
' lngPOS = InStr(1, txtInvDate, "/", 1)
|
||||
' If lngPOS = 0 Then
|
||||
' If Len(txtInvDate) > 0 Then
|
||||
' txtInvDate = Format(txtInvDate, "00/00/####")
|
||||
' If Not IsDate(txtInvDate) Then
|
||||
' MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
' txtInvDate.SetFocus
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf IsDate(txtInvDate) Then
|
||||
' Exit Sub
|
||||
' Else
|
||||
' MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
' txtInvDate.SetFocus
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtItemAmt_GotFocus()
|
||||
' Call FieldSelect(txtItemAmt)
|
||||
' msglItemAmt = Single2Field(txtItemAmt)
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtItemAmt_LostFocus()
|
||||
' If msglItemAmt < Field2Str2(txtItemAmt) Then
|
||||
' msglInvTotal = msglInvTotal + Field2Str2(txtItemAmt)
|
||||
' txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
' ElseIf msglItemAmt > Field2Str2(txtItemAmt) Then
|
||||
' msglInvTotal = msglInvTotal - Field2Str2(txtItemAmt)
|
||||
' txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
' ElseIf msglItemAmt = Field2Str(txtItemAmt) Then
|
||||
' txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtSalesCode_GotFocus()
|
||||
' Call FieldSelect(txtSalesCode)
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtSalesCode_LostFocus()
|
||||
' txtSalesCode = UCase(txtSalesCode)
|
||||
'End Sub
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,687 @@
|
||||
VERSION 5.00
|
||||
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 frmAPMaster
|
||||
Caption = "AP Master List"
|
||||
ClientHeight = 3780
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 10590
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 3780
|
||||
ScaleWidth = 10590
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.TextBox txtZip
|
||||
Height = 345
|
||||
Left = 6120
|
||||
MaxLength = 5
|
||||
TabIndex = 8
|
||||
Top = 2805
|
||||
Width = 1470
|
||||
End
|
||||
Begin VB.TextBox txtState
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 2
|
||||
TabIndex = 7
|
||||
Top = 2475
|
||||
Width = 465
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
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 = 5250
|
||||
TabIndex = 15
|
||||
Top = 3225
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox txtAddress1
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 30
|
||||
TabIndex = 2
|
||||
Top = 1425
|
||||
Width = 4395
|
||||
End
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 3675
|
||||
Left = 180
|
||||
TabIndex = 13
|
||||
Top = 45
|
||||
Width = 5010
|
||||
_Version = 196608
|
||||
_ExtentX = 8837
|
||||
_ExtentY = 6482
|
||||
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 = 3
|
||||
Sorted = 1
|
||||
LineWidth = 1
|
||||
SelDrawFocusRect= -1 'True
|
||||
ColumnSeparatorChar= 9
|
||||
ColumnSearch = 2
|
||||
ColumnWidthScale= 2
|
||||
RowHeight = -1
|
||||
MultiSelect = 0
|
||||
WrapList = 0 'False
|
||||
WrapWidth = 0
|
||||
SelMax = -1
|
||||
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
|
||||
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= 300
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmAPMaster.frx":0000
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 9555
|
||||
Top = 2625
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
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 = 495
|
||||
Left = 9300
|
||||
TabIndex = 12
|
||||
Top = 3225
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 7275
|
||||
TabIndex = 10
|
||||
Top = 3225
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox txtName
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 30
|
||||
TabIndex = 1
|
||||
Top = 1065
|
||||
Width = 4395
|
||||
End
|
||||
Begin VB.TextBox txtCity
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 20
|
||||
TabIndex = 6
|
||||
Top = 2130
|
||||
Width = 4395
|
||||
End
|
||||
Begin VB.TextBox txtAddress2
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 30
|
||||
TabIndex = 4
|
||||
Top = 1785
|
||||
Width = 4395
|
||||
End
|
||||
Begin VB.TextBox txtCustNo
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 7
|
||||
TabIndex = 0
|
||||
Top = 720
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.Label lblCNum
|
||||
Caption = "This Field Must Match CMS Vendor No"
|
||||
BeginProperty Font
|
||||
Name = "Arial"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
ForeColor = &H00FF0000&
|
||||
Height = 255
|
||||
Left = 7320
|
||||
TabIndex = 19
|
||||
Top = 780
|
||||
Width = 3225
|
||||
End
|
||||
Begin VB.Label lblInstr
|
||||
Caption = "Fill out the information on this screen completely. Especially the Vendor No which must match CMS."
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 630
|
||||
Left = 5370
|
||||
TabIndex = 18
|
||||
Top = 60
|
||||
Width = 5145
|
||||
End
|
||||
Begin VB.Label lblZip
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "ZipCode: "
|
||||
Height = 195
|
||||
Left = 5415
|
||||
TabIndex = 17
|
||||
Top = 2910
|
||||
Width = 690
|
||||
End
|
||||
Begin VB.Label blbState
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "State: "
|
||||
Height = 195
|
||||
Left = 5640
|
||||
TabIndex = 16
|
||||
Top = 2535
|
||||
Width = 465
|
||||
End
|
||||
Begin VB.Label lblInvType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address1: "
|
||||
Height = 195
|
||||
Left = 5355
|
||||
TabIndex = 14
|
||||
Top = 1545
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "City: "
|
||||
Height = 195
|
||||
Left = 5760
|
||||
TabIndex = 11
|
||||
Top = 2235
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Vend Name:"
|
||||
Height = 195
|
||||
Left = 5220
|
||||
TabIndex = 9
|
||||
Top = 1170
|
||||
Width = 885
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address2: "
|
||||
Height = 195
|
||||
Left = 5355
|
||||
TabIndex = 5
|
||||
Top = 1890
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Vendor No: "
|
||||
Height = 195
|
||||
Left = 5250
|
||||
TabIndex = 3
|
||||
Top = 840
|
||||
Width = 855
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmAPMaster"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSHeader As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String, mboolADD As Boolean
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strVend As String, strAMOUNT As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
strSQL = "SELECT * FROM tblAPMaster"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
strLine = Field2Str2(oRS!Bill_ID) & vbTab & Field2Str(oRS!Cust_NO) & vbTab & Field2Str(oRS!Name) ' & vbTab
|
||||
' strLine = strLine & Field2Str(oRS!Address1) & vbTab & Field2Str(oRS!Address2) & vbTab & Field2Str(oRS!InvoiceType) & vbTab
|
||||
' strLine = strLine & Field2Str(oRS!InvoiceDate) & vbTab & Field2Str(oRS!JobNumber) & vbTab & Format(strAMOUNT, "Currency") ' & " " & Format(Field2Str2(oRS!Lot_id), "000000")
|
||||
.AddItem strLine
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
lstHeader.ListIndex = -1
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APMaster - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
cmdSave.Enabled = True
|
||||
cmdExit.Enabled = True
|
||||
mboolADD = True
|
||||
txtCustNo.Enabled = True
|
||||
Call FormClear
|
||||
Call FormSave
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSHeader.State = adStateOpen Then
|
||||
moRSHeader.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
cmdAdd.Enabled = True
|
||||
txtCustNo.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call HeaderLoad
|
||||
mboolADD = False
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSHeader
|
||||
txtCustNo = Field2Str(!Cust_NO)
|
||||
txtNAME = Field2Str(!Name)
|
||||
txtAddress1 = Field2Str(!Address1)
|
||||
txtAddress2 = Field2Str(!Address2)
|
||||
txtCity = Field2Str(!City)
|
||||
txtSTATE = Field2Str(!State)
|
||||
txtZIP = Field2Str(!ZipCode)
|
||||
End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APMaster - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APMaster - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String, strID As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
lstHeader.col = 0
|
||||
strID = lstHeader.ColText
|
||||
strSQL = "SELECT * FROM tblAPMaster WHERE Bill_id = " & strID
|
||||
Set moRSHeader = New Recordset
|
||||
moRSHeader.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
||||
|
||||
If moRSHeader.EOF Then
|
||||
FormFind = False
|
||||
Call FormClear
|
||||
Else
|
||||
FormFind = True
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APMaster - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSHeader
|
||||
If mboolADD = True Then
|
||||
.AddNew
|
||||
mboolADD = False
|
||||
End If
|
||||
!Cust_NO = Field2Str(txtCustNo)
|
||||
!Name = Field2Str(txtNAME)
|
||||
!Address1 = Field2Str(txtAddress1)
|
||||
!Address2 = Field2Str(txtAddress2)
|
||||
!City = Field2Str(txtCity)
|
||||
!State = Field2Str(txtSTATE)
|
||||
!ZipCode = Field2Str(txtZIP)
|
||||
.Update
|
||||
End With
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APMaster - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtCustNo = ""
|
||||
txtNAME = ""
|
||||
txtAddress1 = ""
|
||||
txtAddress2 = ""
|
||||
txtCity = ""
|
||||
txtSTATE = ""
|
||||
txtZIP = ""
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
txtNAME.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress1_GotFocus()
|
||||
Call FieldSelect(txtAddress1)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress1_LostFocus()
|
||||
txtAddress1 = UCase(txtAddress1)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress2_GotFocus()
|
||||
Call FieldSelect(txtAddress2)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress2_LostFocus()
|
||||
txtAddress2 = UCase(txtAddress2)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCity_GotFocus()
|
||||
Call FieldSelect(txtCity)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCity_LostFocus()
|
||||
txtCity = UCase(txtCity)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCustNo_GotFocus()
|
||||
Call FieldSelect(txtCustNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCustNo_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
txtCustNo = UCase(txtCustNo)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String, strCUST As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT * FROM ARN_InvHistoryHeader WHERE CustomerNumber = '" & strCUST & "'"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
|
||||
strSELECT = "{ARN_InvHistoryHeader.CustomerNumber}= '" & strCUST & "' and {ARN_InvHistoryHeader.JobNumber} = ''"
|
||||
crAR.ReportFileName = App.Path & "\arblanks.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APMaster - Module Print"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub txtNAME_GotFocus()
|
||||
Call FieldSelect(txtNAME)
|
||||
End Sub
|
||||
|
||||
Private Sub txtNAME_LostFocus()
|
||||
txtNAME = UCase(txtNAME)
|
||||
End Sub
|
||||
|
||||
Private Sub txtState_GotFocus()
|
||||
Call FieldSelect(txtSTATE)
|
||||
End Sub
|
||||
|
||||
Private Sub txtState_LostFocus()
|
||||
txtSTATE = UCase(txtSTATE)
|
||||
End Sub
|
||||
|
||||
Private Sub txtZip_GotFocus()
|
||||
Call FieldSelect(txtZIP)
|
||||
End Sub
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,892 @@
|
||||
VERSION 5.00
|
||||
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 frmAR2
|
||||
Caption = "Accounts Receivable"
|
||||
ClientHeight = 4950
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 7530
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4950
|
||||
ScaleWidth = 7530
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 2835
|
||||
Left = 195
|
||||
TabIndex = 17
|
||||
Top = 585
|
||||
Width = 4470
|
||||
_Version = 196608
|
||||
_ExtentX = 7885
|
||||
_ExtentY = 5001
|
||||
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 = 6
|
||||
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= -1
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmAR2.frx":0000
|
||||
End
|
||||
Begin VB.TextBox txtTax
|
||||
Height = 315
|
||||
Left = 5580
|
||||
TabIndex = 16
|
||||
Top = 3000
|
||||
Width = 495
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 165
|
||||
Top = 60
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "RePrint Invoice"
|
||||
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 = 6180
|
||||
TabIndex = 14
|
||||
Top = 3675
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.ComboBox cboARCode
|
||||
Height = 315
|
||||
Left = 2955
|
||||
Sorted = -1 'True
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 1
|
||||
Top = 195
|
||||
Width = 4515
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "E&xit"
|
||||
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 = 6180
|
||||
TabIndex = 13
|
||||
Top = 4395
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 6180
|
||||
TabIndex = 12
|
||||
Top = 2955
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CheckBox chkReady
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Ready to Transfer to CMS:"
|
||||
Height = 315
|
||||
Left = 5190
|
||||
TabIndex = 7
|
||||
Top = 2415
|
||||
Width = 2205
|
||||
End
|
||||
Begin VB.TextBox txtItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 11
|
||||
TabIndex = 6
|
||||
Top = 1935
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtSalesCode
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 7
|
||||
TabIndex = 5
|
||||
Top = 1515
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 4
|
||||
Top = 1095
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 6240
|
||||
MaxLength = 10
|
||||
TabIndex = 3
|
||||
Top = 675
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.ListBox lstDetail
|
||||
Height = 1230
|
||||
Left = 180
|
||||
TabIndex = 2
|
||||
Top = 3660
|
||||
Width = 5895
|
||||
End
|
||||
Begin VB.Label lblTax
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Tax Code"
|
||||
Height = 195
|
||||
Left = 4830
|
||||
TabIndex = 15
|
||||
Top = 3090
|
||||
Width = 690
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "CMS Sales Code:"
|
||||
Height = 195
|
||||
Left = 4920
|
||||
TabIndex = 11
|
||||
Top = 1620
|
||||
Width = 1245
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Item Amount:"
|
||||
Height = 195
|
||||
Left = 5235
|
||||
TabIndex = 10
|
||||
Top = 2040
|
||||
Width = 930
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Payment Due Date:"
|
||||
Height = 195
|
||||
Left = 4770
|
||||
TabIndex = 9
|
||||
Top = 1200
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Date:"
|
||||
Height = 195
|
||||
Left = 5190
|
||||
TabIndex = 8
|
||||
Top = 780
|
||||
Width = 960
|
||||
End
|
||||
Begin VB.Label lblARCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Builder's CMS AR Code:"
|
||||
Height = 195
|
||||
Left = 1200
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 1710
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmAR2"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSDetail As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String, mstrPO_NUM As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String, mlngTRANSID As Long
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single, mlngTRANS2 As Long
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
'Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
' strTYPE = Trim(Left(cboARCode, 7))
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt from tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt FROM tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
' strTYPE = oRS.RecordCount
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
strLine = ""
|
||||
strLine = Field2Str2(oRS!Trans_ID) & vbTab & Field2Str(oRS!invoice_no) & vbTab & Field2Str(oRS!invoice_date) & vbTab
|
||||
' strLine = Field2Str2(oRS!Lot_id) & vbTab & Field2Str(oRS!invoice_no) & vbTab & Field2Str(oRS!invoice_date) & vbTab
|
||||
strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "#,#.00;(#,#.00)") & vbTab & Format(Field2Str2(oRS!Lot_ID), "000000") & vbTab & (Field2Str(oRS!po_num))
|
||||
' strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "#,#.00;(#,#.00)") & vbTab & Format(Field2Str2(oRS!Lot_id), "000000") & vbTab & Format(Field2Str(oRS!po_num))
|
||||
' strLine = ""
|
||||
' strLine = Field2Str(oRS!invoice_no) & " " & Field2Str(oRS!invoice_date) & vbTab
|
||||
' strLine = strLine & Format(Field2Str2(oRS!non_tax_amt), "Currency") & " " & Format(Field2Str2(oRS!Lot_id), "000000")
|
||||
.AddItem strLine
|
||||
' .AddItem strLine
|
||||
' .ItemData(.NewIndex) = oRS!Trans_ID
|
||||
' .ItemData(.NewIndex) = oRS!Lot_ID
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
gintLOTID = 0
|
||||
lstHeader.ListIndex = -1
|
||||
cmdPrint.Enabled = False
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Repair - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub DetailLoad()
|
||||
Dim oRS As Recordset, strSalesCode As String
|
||||
Dim strSQL As String, strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
' lstHeader.col = 1
|
||||
lstHeader.col = 0
|
||||
mlngTRANS2 = Field2Str2(lstHeader.ColText)
|
||||
' strSQL = "SELECT trans_ID, sales_code, lot_id, header, shipped, description, amount from tblARInvoice WHERE shipped and lot_id = " & gintLOTID & " and not done"
|
||||
strSQL = "SELECT trans_ID, sales_code, lot_id, header, shipped, description, amount, PO_NUM from tblARInvoice WHERE shipped and PO_NUM = '" & mstrPO_NUM & "' and not done"
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
' msglInvTotal = 0
|
||||
lstDetail.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
strSalesCode = Field2Str(oRS!sales_code)
|
||||
If Len(strSalesCode) = 0 Then
|
||||
strSalesCode = "BLANK"
|
||||
' Else
|
||||
|
||||
End If
|
||||
strLine = ""
|
||||
' msglInvTotal = msglInvTotal + field2single(oRS!amount)
|
||||
If Len(Format(Field2Str2(oRS!amount), "currency")) > 7 Then
|
||||
strLine = Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "currency") & vbTab & Field2Str(oRS!Description)
|
||||
Else
|
||||
strLine = Field2Str(oRS!sales_code) & vbTab & Format(Field2Str2(oRS!amount), "currency") & vbTab & vbTab & Field2Str(oRS!Description)
|
||||
End If
|
||||
lstDetail.AddItem strLine
|
||||
lstDetail.ItemData(lstDetail.NewIndex) = Field2Long(oRS!Trans_ID)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstDetail.ListCount Then
|
||||
lstDetail.ListIndex = 0
|
||||
Else
|
||||
lstDetail.ListIndex = -1
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module DetailLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Change()
|
||||
lstHeader.Clear
|
||||
lstDetail.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Click()
|
||||
lstHeader.Clear
|
||||
lstDetail.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub chkReady_Click()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT trans_id, ProjLot, PO_Num FROM tblARINVOICE WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
gstrPONUM = Field2Str(oRS!po_num)
|
||||
mstrPROJLOT = Field2Str(oRS!ProjLot)
|
||||
Call LotChange(mstrPROJLOT, "RePrint AR Invoice")
|
||||
|
||||
strSELECT = "{tblARInvoice.po_num} = '" & gstrPONUM & "'"
|
||||
' strSELECT = "{tblARInvoice.invoice_no}='" & mstrINV & "'"
|
||||
crAR.ReportFileName = App.Path & "\invoice.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
' crAR.CopiesToPrinter = gintCOPY
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
' crar.Destination = crptToPrinter
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form LotInfo - Module PrintStoneInv"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
' Call DataHasChanged
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSProj.State = adStateOpen Then
|
||||
moRSProj.Close
|
||||
End If
|
||||
If moRSDetail.State = adStateOpen Then
|
||||
moRSDetail.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
mintBOOKMARK = lstDetail.ListIndex
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
lstDetail.Enabled = True
|
||||
lstDetail.ListIndex = mintBOOKMARK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call ARCodeLoad
|
||||
|
||||
End Sub
|
||||
Private Sub ProjLoad()
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID
|
||||
|
||||
Set moRSProj = New Recordset
|
||||
moRSProj.Open strSQL, goConn, _
|
||||
adOpenForwardOnly, adLockReadOnly
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module ProjLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
Private Sub ARCodeLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, intRows As Integer, strLine As String
|
||||
Dim row, col As Long
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
' strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
Do Until oRS.EOF
|
||||
strLine = Field2Str(oRS!Cust_NO) & " - " & Field2Str(oRS!Name)
|
||||
cboARCode.AddItem strLine
|
||||
cboARCode.ItemData(cboARCode.NewIndex) = Field2Long(oRS!Bill_ID)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module ARCodeLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSDetail
|
||||
txtInvDate = Field2Str(!invoice_date)
|
||||
txtDueDate = Field2Str(!inv_due_date)
|
||||
txtItemAmt = Format(Field2Str2(!amount), "#,#.00;(#,#.00)")
|
||||
' txtItemAmt = Format(Field2Str2(!amount), "Standard")
|
||||
txtSalesCode = Field2Str(!sales_code)
|
||||
If Len(txtSalesCode) = 0 Then
|
||||
txtSalesCode = "BLANK"
|
||||
txtSalesCode.BackColor = &H80FFFF
|
||||
txtSalesCode.ForeColor = &HFF&
|
||||
Else
|
||||
txtSalesCode.BackColor = &H80000005
|
||||
txtSalesCode.ForeColor = &H80000008
|
||||
txtSalesCode.FontBold = False
|
||||
End If
|
||||
txtTAX = Field2Str(!taxcode)
|
||||
If txtTAX = "AZ" Then
|
||||
txtTAX.BackColor = &H80FFFF
|
||||
txtTAX.ForeColor = &HFF&
|
||||
txtTAX.FontBold = True
|
||||
Else
|
||||
txtTAX.BackColor = &H80000005
|
||||
txtTAX.ForeColor = &H80000008
|
||||
txtTAX.FontBold = False
|
||||
End If
|
||||
chkReady = Field2CheckBox(!ready)
|
||||
End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Function FormFindDetail() As Boolean
|
||||
Dim strSQL As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblARInvoice "
|
||||
strSQL = strSQL & "WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
Set moRSDetail = New Recordset
|
||||
moRSDetail.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSDetail.EOF Then
|
||||
FormFindDetail = False
|
||||
Else
|
||||
FormFindDetail = True
|
||||
msglInvTotal = moRSDetail!non_tax_amt
|
||||
mstrType = moRSDetail!inv_type
|
||||
gintPROJID = moRSDetail!PROJ_ID
|
||||
Call ProjLoad
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FormFindDetail"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstDetail_Click()
|
||||
If lstDetail.ListIndex <> -1 Then
|
||||
If FormFindDetail() Then
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String, lngTRANSID As Long
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSDetail
|
||||
!invoice_date = Str2Field(txtInvDate)
|
||||
!inv_due_date = Str2Field(txtDueDate)
|
||||
!price = Str2Field(txtItemAmt)
|
||||
!amount = Str2Field(txtItemAmt)
|
||||
!sales_code = Str2Field(txtSalesCode)
|
||||
.Update
|
||||
End With
|
||||
|
||||
strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE PO_NUM = '" & mstrPO_NUM & "' and lot_id = " & gintLOTID & " and not done"
|
||||
' strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE Trans_ID = " & mlngTRANSID & " and lot_id = " & gintLOTID & " and not done"
|
||||
' strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID & " and not done"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
msglInvTotal = Field2Str2(oRS!sglTOTAL)
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE PO_NUM = '" & mstrPO_NUM & "' and lot_id = " & gintLOTID
|
||||
' strSQL = "SELECT * FROM tblARInvoice WHERE Trans_ID = " & mlngTRANSID & " and lot_id = " & gintLOTID
|
||||
' strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = Str2Field(txtInvDate)
|
||||
!inv_due_date = Str2Field(txtDueDate)
|
||||
!ready = chkReady
|
||||
!non_tax_amt = msglInvTotal
|
||||
!taxcode = Str2Field(txtTAX)
|
||||
If Field2Str2(moRSProj!retention) > 0 Then
|
||||
!retention_amt = Format(((msglInvTotal * Field2Str2(moRSProj!retention) / 100)), "#.00")
|
||||
Else
|
||||
!retention_amt = 0
|
||||
End If
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
' If lstHeader.ListCount = 0 Then
|
||||
' intResponse = MsgBox("No Invoices For This Builder - Select A Different Builder.", vbExclamation + vbOKOnly, "Exit Form")
|
||||
' Unload Me
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvDate = ""
|
||||
txtDueDate = ""
|
||||
txtSalesCode = ""
|
||||
txtItemAmt = ""
|
||||
chkReady = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Sub lstDetail_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
On Error GoTo Error_EH
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
lstHeader.col = 0
|
||||
mlngTRANSID = Field2Str2(lstHeader.ColText)
|
||||
cmdPrint.Enabled = True
|
||||
lstHeader.col = 4
|
||||
gintLOTID = lstHeader.ColText
|
||||
lstHeader.col = 5
|
||||
mstrPO_NUM = Field2Str(lstHeader.ColText)
|
||||
' gintLOTID = lstHeader.ItemData(lstHeader.ListIndex)
|
||||
Call DetailLoad
|
||||
If lstDetail.ListIndex <> -1 Then
|
||||
Else
|
||||
lstDetail.Clear
|
||||
Call FormClear
|
||||
End If
|
||||
Else
|
||||
cmdPrint.Enabled = False
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form AR - Module lstHeader_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_GotFocus()
|
||||
Call FieldSelect(txtDueDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
lngPOS = InStr(1, txtDueDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtDueDate) > 0 Then
|
||||
txtDueDate = Format(txtDueDate, "00/00/####")
|
||||
If Not IsDate(txtDueDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
ElseIf IsDate(txtDueDate) Then
|
||||
Exit Sub
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtDueDate.SetFocus
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvDate_GotFocus()
|
||||
Call FieldSelect(txtInvDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtInvDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
lngPOS = InStr(1, txtInvDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtInvDate) > 0 Then
|
||||
txtInvDate = Format(txtInvDate, "00/00/####")
|
||||
If Not IsDate(txtInvDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtInvDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
ElseIf IsDate(txtInvDate) Then
|
||||
Exit Sub
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtInvDate.SetFocus
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtItemAmt_GotFocus()
|
||||
Call FieldSelect(txtItemAmt)
|
||||
msglItemAmt = Single2Field(txtItemAmt)
|
||||
End Sub
|
||||
|
||||
Private Sub txtItemAmt_LostFocus()
|
||||
If msglItemAmt < Field2Str2(txtItemAmt) Then
|
||||
msglInvTotal = msglInvTotal + Field2Str2(txtItemAmt)
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
ElseIf msglItemAmt > Field2Str2(txtItemAmt) Then
|
||||
msglInvTotal = msglInvTotal - Field2Str2(txtItemAmt)
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
ElseIf msglItemAmt = Field2Str(txtItemAmt) Then
|
||||
txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtSalesCode_GotFocus()
|
||||
Call FieldSelect(txtSalesCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtSalesCode_LostFocus()
|
||||
txtSalesCode = UCase(txtSalesCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtTax_GotFocus()
|
||||
Call FieldSelect(txtTAX)
|
||||
End Sub
|
||||
|
||||
Private Sub txtTax_LostFocus()
|
||||
If Not IsNull(txtTAX) Or txtTAX = "" Then
|
||||
txtTAX = UCase(txtTAX)
|
||||
Else
|
||||
MsgBox "You Must Enter A Sales Tax Code", vbOKOnly, "No Tax Code"
|
||||
txtTAX.SetFocus
|
||||
End If
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,998 @@
|
||||
VERSION 5.00
|
||||
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 frmARFIX
|
||||
Caption = "Accounts Receivable Correction Screen"
|
||||
ClientHeight = 5310
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8880
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5310
|
||||
ScaleWidth = 8880
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.ComboBox cboSort
|
||||
Height = 315
|
||||
ItemData = "frmARFix.frx":0000
|
||||
Left = 7035
|
||||
List = "frmARFix.frx":000A
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 17
|
||||
Top = 2505
|
||||
Width = 1845
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "Print List Of Blank JC#"
|
||||
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 = 6120
|
||||
TabIndex = 16
|
||||
Top = 4220
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox Text1
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 7665
|
||||
TabIndex = 15
|
||||
Top = 1425
|
||||
Width = 465
|
||||
End
|
||||
Begin LpLib.fpCombo cboARCode
|
||||
Height = 315
|
||||
Left = 4815
|
||||
TabIndex = 12
|
||||
Top = 150
|
||||
Width = 4035
|
||||
_Version = 196608
|
||||
_ExtentX = 7117
|
||||
_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 = ""
|
||||
Columns = 3
|
||||
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 = 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 = "frmARFix.frx":001D
|
||||
End
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 4260
|
||||
Left = 60
|
||||
TabIndex = 11
|
||||
Top = 600
|
||||
Width = 6000
|
||||
_Version = 196608
|
||||
_ExtentX = 10583
|
||||
_ExtentY = 7514
|
||||
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 = 9
|
||||
Sorted = 0
|
||||
LineWidth = 1
|
||||
SelDrawFocusRect= -1 'True
|
||||
ColumnSeparatorChar= 9
|
||||
ColumnSearch = 2
|
||||
ColumnWidthScale= 2
|
||||
RowHeight = -1
|
||||
MultiSelect = 0
|
||||
WrapList = 0 'False
|
||||
WrapWidth = 0
|
||||
SelMax = -1
|
||||
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
|
||||
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= 300
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmARFix.frx":041D
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 165
|
||||
Top = 60
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "E&xit"
|
||||
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 = 6120
|
||||
TabIndex = 10
|
||||
Top = 4755
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 7590
|
||||
TabIndex = 3
|
||||
Top = 4755
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox txtItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 10
|
||||
TabIndex = 5
|
||||
Top = 1065
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 7
|
||||
TabIndex = 4
|
||||
Top = 2145
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtDueDate
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 7
|
||||
TabIndex = 2
|
||||
Top = 1785
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.TextBox txtInvDate
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 7665
|
||||
MaxLength = 10
|
||||
TabIndex = 1
|
||||
Top = 720
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.Label lblSort
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Sort By:"
|
||||
Height = 195
|
||||
Left = 6420
|
||||
TabIndex = 18
|
||||
Top = 2565
|
||||
Width = 555
|
||||
End
|
||||
Begin VB.Label lblInvType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Type:"
|
||||
Height = 195
|
||||
Left = 6480
|
||||
TabIndex = 14
|
||||
Top = 1545
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.Label lblLOAD
|
||||
Alignment = 2 'Center
|
||||
BackColor = &H00C0FFFF&
|
||||
Caption = "Loading Invoices -- Patience"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 13.5
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
ForeColor = &H000000FF&
|
||||
Height = 750
|
||||
Left = 6105
|
||||
TabIndex = 13
|
||||
Top = 3420
|
||||
Visible = 0 'False
|
||||
Width = 2745
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Amount:"
|
||||
Height = 195
|
||||
Left = 6390
|
||||
TabIndex = 9
|
||||
Top = 2235
|
||||
Width = 1155
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice Sequence:"
|
||||
Height = 195
|
||||
Left = 6195
|
||||
TabIndex = 8
|
||||
Top = 1170
|
||||
Width = 1350
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Job Cost Number:"
|
||||
Height = 195
|
||||
Left = 6285
|
||||
TabIndex = 7
|
||||
Top = 1890
|
||||
Width = 1260
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Invoice #:"
|
||||
Height = 195
|
||||
Left = 6825
|
||||
TabIndex = 6
|
||||
Top = 810
|
||||
Width = 720
|
||||
End
|
||||
Begin VB.Label lblARCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Builders's CMS AR Code:"
|
||||
Height = 195
|
||||
Left = 3000
|
||||
TabIndex = 0
|
||||
Top = 240
|
||||
Width = 1785
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmARFIX"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSHeader As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strVend As String, strAMOUNT As String
|
||||
'Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
' strTYPE = Trim(Left(cboARCode, 7))
|
||||
' strSQL = "SELECT Invoice_date, Invoice_no, lot_id, trans_id, header, shipped, customer_no, non_tax_amt from tblARInvoice WHERE shipped and header and customer_no = '" & Trim(Left(cboARCode, 7)) & "' and not done"
|
||||
lblLOAD.Visible = True
|
||||
DoEvents
|
||||
If cboARCode.ListIndex = -1 Then
|
||||
strSQL = "SELECT * FROM ARN_InvHistoryHeader " 'WHERE vendornumber = '" & strVend & "'" ' and not done"
|
||||
Else
|
||||
cboARCode.col = 1
|
||||
strVend = cboARCode.ColText
|
||||
' strSQL = "SELECT * FROM APH_JobDistDetail ORDER BY VendorNumber and InvoiceNumber" 'WHERE shipped and header and customer_no = '" & strVend & "' and not done"
|
||||
strSQL = "SELECT * FROM ARN_InvHistoryHeader WHERE customernumber = '" & strVend & "'" ' and not done"
|
||||
End If
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
' strTYPE = oRS.RecordCount
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
If Field2Str2(oRS!TaxableSalesAmount) >= 0 Then
|
||||
strAMOUNT = Field2Str2(oRS!NonTaxableSalesAmount)
|
||||
Else
|
||||
strAMOUNT = Field2Str2(oRS!TaxableSalesAmount)
|
||||
End If
|
||||
strLine = Field2Str2(oRS!AR_ID) & vbTab & Field2Str(oRS!CustomerNumber) & vbTab '& Field2Str(oRS!Name) & vbTab
|
||||
strLine = strLine & Field2Str(oRS!InvoiceNumber) & vbTab & Field2Str(oRS!seqnumber) & vbTab & Field2Str(oRS!InvoiceType) & vbTab
|
||||
strLine = strLine & Field2Str(oRS!InvoiceDate) & vbTab & Field2Str(oRS!JobNumber) & vbTab & Format(strAMOUNT, "Currency") & vbTab & Format(Field2Str(oRS!InvoiceDate), "YYYYMMDD")
|
||||
.AddItem strLine
|
||||
' .ItemData(.NewIndex) = oRS!Trans_ID
|
||||
' .ItemData(.NewIndex) = oRS!Lot_id
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
' gintLOTID = 0
|
||||
lstHeader.ListIndex = -1
|
||||
' cmdPrint.Enabled = False
|
||||
End If
|
||||
|
||||
lblLOAD.Visible = False
|
||||
cboSort.ListIndex = 0
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARFix - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
lblLOAD.Visible = False
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cboARCode_Click()
|
||||
lstHeader.Clear
|
||||
Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cboSort_Change()
|
||||
If cboSort.ListIndex = 0 Then
|
||||
lstHeader.col = 2
|
||||
lstHeader.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstHeader.ColSorted = SortedDescending
|
||||
lstHeader.Sorted = SortedDescending
|
||||
' lstHeader.Sorted
|
||||
ElseIf cboSort.ListIndex = 1 Then
|
||||
lstHeader.col = 5
|
||||
lstHeader.ColSorted = SortedDescending
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cboSort_Click()
|
||||
If cboSort.ListIndex = 0 Then
|
||||
lstHeader.col = 8
|
||||
' lstHeader.ColSortDataType = ColSortDataTypeDate
|
||||
lstHeader.ColSortSeq = -1
|
||||
lstHeader.ColSorted = SortedNone
|
||||
lstHeader.Sorted = SortedNone
|
||||
lstHeader.col = 2
|
||||
lstHeader.ColSortSeq = 0
|
||||
lstHeader.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstHeader.ColSorted = SortedAscending
|
||||
lstHeader.Sorted = SortedAscending
|
||||
' lstHeader.Sorted
|
||||
ElseIf cboSort.ListIndex = 1 Then
|
||||
lstHeader.col = 2
|
||||
lstHeader.ColSortSeq = -1
|
||||
' lstHeader.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstHeader.ColSorted = SortedNone
|
||||
lstHeader.Sorted = SortedNone
|
||||
lstHeader.col = 8
|
||||
lstHeader.ColSortSeq = 0
|
||||
lstHeader.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
' lstHeader.ColSortDataType = ColSortDataTypeDate
|
||||
lstHeader.ColSorted = SortedDescending
|
||||
lstHeader.Sorted = SortedDescending
|
||||
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_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
' Call DataHasChanged
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSProj.State = adStateOpen Then
|
||||
' moRSProj.Close
|
||||
' End If
|
||||
If moRSHeader.State = adStateOpen Then
|
||||
moRSHeader.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
' mintBOOKMARK = lstDetail.ListIndex
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
' lstDetail.Enabled = True
|
||||
' lstDetail.ListIndex = mintBOOKMARK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call ARCodeLoad
|
||||
' Call HeaderLoad
|
||||
End Sub
|
||||
|
||||
'Private Sub ProjLoad()
|
||||
'Dim strSQL As String
|
||||
' On Error GoTo Error_EH
|
||||
|
||||
' strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID
|
||||
|
||||
' Set moRSProj = New Recordset
|
||||
' moRSProj.Open strSQL, goConn, _
|
||||
' adOpenForwardOnly, adLockReadOnly
|
||||
' Exit Sub
|
||||
|
||||
'Error_EH:
|
||||
' gstrMODULE = "Form APFix - Module ProjLoad"
|
||||
' Call ErrorHandler2
|
||||
' gstrMODULE = ""
|
||||
' Exit Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub ARCodeLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, intRows As Integer, strLine As String
|
||||
Dim row, col As Long
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblARMaster"
|
||||
' strSQL = "SELECT Bill_Id, Cust_no, Name FROM tblARMaster"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
Do Until oRS.EOF
|
||||
strLine = Field2Str2(oRS!Bill_ID) & vbTab & Field2Str(oRS!Cust_NO) & vbTab & Field2Str(oRS!Name) ' & vbTab & Field2Str(oRS!Name) & vbTab & Field2Str(oRS!Name) '& vbTab & Field2Str(oRS!Name)
|
||||
cboARCode.AddItem strLine
|
||||
' cboARCode.ItemData(cboARCode.NewIndex) = Field2Long(oRS!bill_id)
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
' cboARCode.ListIndex = 0
|
||||
cboARCode.ListIndex = -1
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module APCodeLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
' With moRSDetail
|
||||
' txtInvDate = Field2Str(!invoice_date)
|
||||
' txtDueDate = Field2Str(!inv_due_date)
|
||||
' txtItemAmt = Format(Field2Str2(!amount), "currency")
|
||||
' txtSalesCode = Field2Str(!sales_code)
|
||||
' txtTax = Field2Str(!taxcode)
|
||||
' chkReady = Field2CheckBox(!ready)
|
||||
' End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FormSave"
|
||||
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 tblARInvoice "
|
||||
' strSQL = strSQL & "WHERE trans_id = " & lstDetail.ItemData(lstDetail.ListIndex)
|
||||
' Set moRSDetail = New Recordset
|
||||
' moRSDetail.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSHeader.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
msglInvTotal = moRSHeader!non_tax_amt
|
||||
mstrType = moRSHeader!inv_type
|
||||
gintPROJID = moRSHeader!PROJ_ID
|
||||
' Call ProjLoad
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
'Private Sub lstDetail_Click()
|
||||
' If lstDetail.ListIndex <> -1 Then
|
||||
' If FormFind() Then
|
||||
' Call FormShow
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSHeader
|
||||
' !invoice_date = Str2Field(txtInvDate)
|
||||
!JobNumber = Str2Field(txtDueDate)
|
||||
' !price = Str2Field(txtItemAmt)
|
||||
' !amount = Str2Field(txtItemAmt)
|
||||
' !sales_code = Str2Field(txtSalesCode)
|
||||
.Update
|
||||
End With
|
||||
|
||||
' strSQL = "SELECT sum(amount) as sgltotal FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID & " and not done"
|
||||
' Set oRS = New Recordset
|
||||
' oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
' msglInvTotal = Field2Str2(oRS!sglTOTAL)
|
||||
|
||||
' strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
' Set oRS = New Recordset
|
||||
' oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
' Do Until oRS.EOF
|
||||
' With oRS
|
||||
' !invoice_date = Str2Field(txtInvDate)
|
||||
' !inv_due_date = Str2Field(txtDueDate)
|
||||
' !ready = chkReady
|
||||
' !non_tax_amt = msglInvTotal
|
||||
' !taxcode = Str2Field(txtTax)
|
||||
' If Field2Str2(moRSProj!retention) > 0 Then
|
||||
' !retention_amt = Format(((msglInvTotal * Field2Str2(moRSProj!retention) / 100)), "#.00")
|
||||
' Else
|
||||
' !retention_amt = 0
|
||||
' End If
|
||||
' .Update
|
||||
' End With
|
||||
' oRS.MoveNext
|
||||
' Loop
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
' If lstHeader.ListCount = 0 Then
|
||||
' intResponse = MsgBox("No Invoices For This Builder - Select A Different Builder.", vbExclamation + vbOKOnly, "Exit Form")
|
||||
' Unload Me
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtInvDate = ""
|
||||
txtDueDate = ""
|
||||
txtSalesCode = ""
|
||||
txtItemAmt = ""
|
||||
' chkReady = vbUnchecked
|
||||
End Sub
|
||||
|
||||
'Private Sub lstDetail_DblClick()
|
||||
' cmdSave.Enabled = True
|
||||
'End Sub
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
Dim strSQL As String, oRS As Recordset
|
||||
Dim strID As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
lstHeader.col = 0
|
||||
strID = lstHeader.ColText
|
||||
strSQL = "SELECT * FROM ARN_InvHistoryHeader WHERE ar_id = " & strID
|
||||
Set moRSHeader = New Recordset
|
||||
moRSHeader.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
||||
|
||||
If Not moRSHeader.EOF Then
|
||||
txtSalesCode = Format(Field2Str(moRSHeader!TaxableSalesAmount), "#,#.00")
|
||||
txtDueDate = Field2Str(moRSHeader!JobNumber)
|
||||
txtInvDate = Field2Str(moRSHeader!InvoiceNumber)
|
||||
txtItemAmt = Field2Str2(moRSHeader!seqnumber)
|
||||
Else
|
||||
txtSalesCode = ""
|
||||
txtDueDate = ""
|
||||
txtInvDate = ""
|
||||
txtItemAmt = ""
|
||||
End If
|
||||
' txtDueDate.SetFocus
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form APFix - Module lstHeader_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
txtDueDate.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_GotFocus()
|
||||
Call FieldSelect(txtDueDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
' lngPOS = InStr(1, txtDueDate, "/", 1)
|
||||
' If lngPOS = 0 Then
|
||||
' If Len(txtDueDate) > 0 Then
|
||||
' txtDueDate = Format(txtDueDate, "00/00/####")
|
||||
' If Not IsDate(txtDueDate) Then
|
||||
' MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
' txtDueDate.SetFocus
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf IsDate(txtDueDate) Then
|
||||
' Exit Sub
|
||||
' Else
|
||||
' MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
' txtDueDate.SetFocus
|
||||
' End If
|
||||
txtDueDate = UCase(txtDueDate)
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub txtInvDate_GotFocus()
|
||||
' Call FieldSelect(txtInvDate)
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtInvDate_LostFocus()
|
||||
'Dim lngPOS As Long
|
||||
|
||||
' lngPOS = InStr(1, txtInvDate, "/", 1)
|
||||
' If lngPOS = 0 Then
|
||||
' If Len(txtInvDate) > 0 Then
|
||||
' txtInvDate = Format(txtInvDate, "00/00/####")
|
||||
' If Not IsDate(txtInvDate) Then
|
||||
' MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
' txtInvDate.SetFocus
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf IsDate(txtInvDate) Then
|
||||
' Exit Sub
|
||||
' Else
|
||||
' MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
' txtInvDate.SetFocus
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtItemAmt_GotFocus()
|
||||
' Call FieldSelect(txtItemAmt)
|
||||
' msglItemAmt = Single2Field(txtItemAmt)
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtItemAmt_LostFocus()
|
||||
' If msglItemAmt < Field2Str2(txtItemAmt) Then
|
||||
' msglInvTotal = msglInvTotal + Field2Str2(txtItemAmt)
|
||||
' txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
' ElseIf msglItemAmt > Field2Str2(txtItemAmt) Then
|
||||
' msglInvTotal = msglInvTotal - Field2Str2(txtItemAmt)
|
||||
' txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
' ElseIf msglItemAmt = Field2Str(txtItemAmt) Then
|
||||
' txtItemAmt = Format(txtItemAmt, "#,#.00")
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtSalesCode_GotFocus()
|
||||
' Call FieldSelect(txtSalesCode)
|
||||
'End Sub
|
||||
|
||||
'Private Sub txtSalesCode_LostFocus()
|
||||
' txtSalesCode = UCase(txtSalesCode)
|
||||
'End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String, strCUST As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
cboARCode.col = 1
|
||||
strCUST = cboARCode.ColText
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT * FROM ARN_InvHistoryHeader WHERE CustomerNumber = '" & strCUST & "'"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
' gstrPONUM = Field2Str(oRS!po_num)
|
||||
' mstrPROJLOT = Field2Str(oRS!ProjLot)
|
||||
' Call LotChange(mstrPROJLOT, "RePrint AR Invoice")
|
||||
|
||||
strSELECT = "{ARN_InvHistoryHeader.CustomerNumber}= '" & strCUST & "' and {ARN_InvHistoryHeader.JobNumber} = ''"
|
||||
' strSELECT = "{tblARInvoice.invoice_no}='" & mstrINV & "'"
|
||||
crAR.ReportFileName = App.Path & "\arblanks.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
' crAR.CopiesToPrinter = gintCOPY
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
' crar.Destination = crptToPrinter
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARFix - Module Print"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,762 @@
|
||||
VERSION 5.00
|
||||
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 frmARMaster
|
||||
Caption = "AR Master List"
|
||||
ClientHeight = 4980
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 10590
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4980
|
||||
ScaleWidth = 10590
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.TextBox txtDueDateInfo
|
||||
Height = 885
|
||||
Left = 180
|
||||
MultiLine = -1 'True
|
||||
TabIndex = 10
|
||||
Text = "frmARMaster.frx":0000
|
||||
Top = 4050
|
||||
Width = 10365
|
||||
End
|
||||
Begin VB.TextBox txtZip
|
||||
Height = 345
|
||||
Left = 6120
|
||||
MaxLength = 5
|
||||
TabIndex = 8
|
||||
Top = 2805
|
||||
Width = 1470
|
||||
End
|
||||
Begin VB.TextBox txtState
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 2
|
||||
TabIndex = 7
|
||||
Top = 2475
|
||||
Width = 465
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
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 = 5415
|
||||
TabIndex = 16
|
||||
Top = 3225
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox txtAddress1
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 30
|
||||
TabIndex = 2
|
||||
Top = 1425
|
||||
Width = 4395
|
||||
End
|
||||
Begin LpLib.fpList lstHeader
|
||||
Height = 3675
|
||||
Left = 180
|
||||
TabIndex = 14
|
||||
Top = 45
|
||||
Width = 5010
|
||||
_Version = 196608
|
||||
_ExtentX = 8837
|
||||
_ExtentY = 6482
|
||||
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 = 3
|
||||
Sorted = 1
|
||||
LineWidth = 1
|
||||
SelDrawFocusRect= -1 'True
|
||||
ColumnSeparatorChar= 9
|
||||
ColumnSearch = 2
|
||||
ColumnWidthScale= 2
|
||||
RowHeight = -1
|
||||
MultiSelect = 0
|
||||
WrapList = 0 'False
|
||||
WrapWidth = 0
|
||||
SelMax = -1
|
||||
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
|
||||
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= 300
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmARMaster.frx":0006
|
||||
End
|
||||
Begin Crystal.CrystalReport crAR
|
||||
Left = 9555
|
||||
Top = 2625
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
WindowControlBox= -1 'True
|
||||
WindowMaxButton = -1 'True
|
||||
WindowMinButton = -1 'True
|
||||
WindowState = 2
|
||||
PrintFileLinesPerPage= 60
|
||||
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 = 495
|
||||
Left = 9135
|
||||
TabIndex = 13
|
||||
Top = 3225
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "&Save"
|
||||
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 = 7275
|
||||
TabIndex = 11
|
||||
Top = 3225
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox txtName
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 30
|
||||
TabIndex = 1
|
||||
Top = 1065
|
||||
Width = 4395
|
||||
End
|
||||
Begin VB.TextBox txtCity
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 20
|
||||
TabIndex = 6
|
||||
Top = 2130
|
||||
Width = 4395
|
||||
End
|
||||
Begin VB.TextBox txtAddress2
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 30
|
||||
TabIndex = 4
|
||||
Top = 1785
|
||||
Width = 4395
|
||||
End
|
||||
Begin VB.TextBox txtCustNo
|
||||
Enabled = 0 'False
|
||||
Height = 315
|
||||
Left = 6120
|
||||
MaxLength = 7
|
||||
TabIndex = 0
|
||||
Top = 720
|
||||
Width = 1200
|
||||
End
|
||||
Begin VB.Label lblDue
|
||||
AutoSize = -1 'True
|
||||
Caption = "Due Date Information For This Builder: "
|
||||
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 = 225
|
||||
TabIndex = 21
|
||||
Top = 3810
|
||||
Width = 3345
|
||||
End
|
||||
Begin VB.Label lblCNum
|
||||
Caption = "This Field Must Match CMS Cust No"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
ForeColor = &H00FF0000&
|
||||
Height = 255
|
||||
Left = 7365
|
||||
TabIndex = 20
|
||||
Top = 780
|
||||
Width = 3210
|
||||
End
|
||||
Begin VB.Label lblInstr
|
||||
Caption = $"frmARMaster.frx":0322
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 630
|
||||
Left = 5370
|
||||
TabIndex = 19
|
||||
Top = 60
|
||||
Width = 5145
|
||||
End
|
||||
Begin VB.Label lblZip
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "ZipCode: "
|
||||
Height = 195
|
||||
Left = 5415
|
||||
TabIndex = 18
|
||||
Top = 2910
|
||||
Width = 690
|
||||
End
|
||||
Begin VB.Label blbState
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "State: "
|
||||
Height = 195
|
||||
Left = 5640
|
||||
TabIndex = 17
|
||||
Top = 2535
|
||||
Width = 465
|
||||
End
|
||||
Begin VB.Label lblInvType
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address1: "
|
||||
Height = 195
|
||||
Left = 5355
|
||||
TabIndex = 15
|
||||
Top = 1545
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblSalesCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "City: "
|
||||
Height = 195
|
||||
Left = 5760
|
||||
TabIndex = 12
|
||||
Top = 2235
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.Label lblItemAmt
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Cust Name:"
|
||||
Height = 195
|
||||
Left = 5280
|
||||
TabIndex = 9
|
||||
Top = 1170
|
||||
Width = 825
|
||||
End
|
||||
Begin VB.Label lblDueDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address2: "
|
||||
Height = 195
|
||||
Left = 5355
|
||||
TabIndex = 5
|
||||
Top = 1890
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblInvDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Cust No: "
|
||||
Height = 195
|
||||
Left = 5445
|
||||
TabIndex = 3
|
||||
Top = 840
|
||||
Width = 660
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmARMaster"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSHeader As Recordset
|
||||
Dim moRSProj As Recordset
|
||||
Dim mboolSHOW As Boolean, mboolUPDATE As Boolean, mstrType As String
|
||||
Dim mstrINVNO As String, mstrPROJLOT As String, mboolADD As Boolean
|
||||
Dim mlngINVID As Long, mintBOOKMARK As Integer, mintBOOK As Integer
|
||||
Dim msglItemAmt As Single, msglInvTotal As Single
|
||||
|
||||
Private Sub HeaderLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String, strVend As String, strAMOUNT As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
strSQL = "SELECT * FROM tblARMaster"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstHeader.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstHeader
|
||||
strLine = Field2Str2(oRS!Bill_ID) & vbTab & Field2Str(oRS!Cust_NO) & vbTab & Field2Str(oRS!Name) ' & vbTab
|
||||
' strLine = strLine & Field2Str(oRS!Address1) & vbTab & Field2Str(oRS!Address2) & vbTab & Field2Str(oRS!InvoiceType) & vbTab
|
||||
' strLine = strLine & Field2Str(oRS!InvoiceDate) & vbTab & Field2Str(oRS!JobNumber) & vbTab & Format(strAMOUNT, "Currency") ' & " " & Format(Field2Str2(oRS!Lot_id), "000000")
|
||||
.AddItem strLine
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstHeader.ListCount Then
|
||||
lstHeader.ListIndex = 0
|
||||
Else
|
||||
lstHeader.ListIndex = -1
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARMaster - Module HeaderLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
cmdSave.Enabled = True
|
||||
cmdExit.Enabled = True
|
||||
mboolADD = True
|
||||
txtCustNo.Enabled = True
|
||||
Call FormClear
|
||||
Call FormSave
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
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 moRSHeader.State = adStateOpen Then
|
||||
moRSHeader.Close
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err.Number = 91 Then
|
||||
Resume Next
|
||||
End If
|
||||
gstrMODULE = "Form Repair - Module Form QueryUnload"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
|
||||
mintBOOK = lstHeader.ListIndex
|
||||
cmdExit.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
cmdAdd.Enabled = True
|
||||
txtCustNo.Enabled = False
|
||||
Call FormSave
|
||||
lstHeader.ListIndex = mintBOOK
|
||||
mintBOOKMARK = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
Call HeaderLoad
|
||||
mboolADD = False
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
On Error GoTo Error_EH
|
||||
mboolSHOW = True
|
||||
|
||||
With moRSHeader
|
||||
txtCustNo = Field2Str(!Cust_NO)
|
||||
txtNAME = Field2Str(!Name)
|
||||
txtAddress1 = Field2Str(!Address1)
|
||||
txtAddress2 = Field2Str(!Address2)
|
||||
txtCity = Field2Str(!City)
|
||||
txtSTATE = Field2Str(!State)
|
||||
txtZIP = Field2Str(!ZipCode)
|
||||
txtDueDateInfo = Field2Str(!DueDate)
|
||||
End With
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARMaster - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARMaster - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String, strID As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
lstHeader.col = 0
|
||||
strID = lstHeader.ColText
|
||||
strSQL = "SELECT * FROM tblARMaster WHERE Bill_id = " & strID
|
||||
Set moRSHeader = New Recordset
|
||||
moRSHeader.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
||||
|
||||
If moRSHeader.EOF Then
|
||||
FormFind = False
|
||||
Call FormClear
|
||||
Else
|
||||
FormFind = True
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARMaster - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstHeader_Click()
|
||||
|
||||
If lstHeader.ListIndex <> -1 Then
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset, sglTOTAL As Single
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSHeader
|
||||
If mboolADD = True Then
|
||||
.AddNew
|
||||
mboolADD = False
|
||||
End If
|
||||
!Cust_NO = Field2Str(txtCustNo)
|
||||
!Name = Field2Str(txtNAME)
|
||||
!Address1 = Field2Str(txtAddress1)
|
||||
!Address2 = Field2Str(txtAddress2)
|
||||
!City = Field2Str(txtCity)
|
||||
!State = Field2Str(txtSTATE)
|
||||
!ZipCode = Field2Str(txtZIP)
|
||||
!DueDate = Field2Str(txtDueDateInfo)
|
||||
.Update
|
||||
End With
|
||||
|
||||
Call HeaderLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARMaster - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Activate()
|
||||
Dim intResponse As Integer
|
||||
Dim strSQL As String
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtCustNo = ""
|
||||
txtNAME = ""
|
||||
txtAddress1 = ""
|
||||
txtAddress2 = ""
|
||||
txtCity = ""
|
||||
txtSTATE = ""
|
||||
txtZIP = ""
|
||||
End Sub
|
||||
|
||||
'Private Sub lstHeader2_Click()
|
||||
'Dim strSQL As String, oRS As Recordset
|
||||
'Dim strID As String
|
||||
|
||||
' On Error GoTo Error_EH
|
||||
' If lstHeader.ListIndex <> -1 Then
|
||||
' lstHeader.col = 0
|
||||
' strID = lstHeader.ColText
|
||||
' strSQL = "SELECT * FROM tblARMaster WHERE Bill_id = " & strID
|
||||
' Set moRSHeader = New Recordset
|
||||
' moRSHeader.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
||||
|
||||
' If Not moRSHeader.EOF Then
|
||||
' txtSalesCode = Format(Field2Str(moRSHeader!TaxableSalesAmount), "#,#.00")
|
||||
' txtDueDate = Field2Str(moRSHeader!JobNumber)
|
||||
' txtInvDate = Field2Str(moRSHeader!InvoiceNumber)
|
||||
' txtItemAmt = Field2Str2(moRSHeader!seqnumber)
|
||||
' Else
|
||||
' txtSalesCode = ""
|
||||
' txtDueDate = ""
|
||||
' txtInvDate = ""
|
||||
' txtItemAmt = ""
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' Exit Sub
|
||||
|
||||
'Error_EH:
|
||||
' gstrMODULE = "Form ARMaster - Module lstHeader_Click"
|
||||
' Call ErrorHandler2
|
||||
' gstrMODULE = ""
|
||||
' Exit Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub lstHeader_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
txtNAME.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress1_GotFocus()
|
||||
Call FieldSelect(txtAddress1)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress1_LostFocus()
|
||||
txtAddress1 = UCase(txtAddress1)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress2_GotFocus()
|
||||
Call FieldSelect(txtAddress2)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress2_LostFocus()
|
||||
txtAddress2 = UCase(txtAddress2)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCity_GotFocus()
|
||||
Call FieldSelect(txtCity)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCity_LostFocus()
|
||||
txtCity = UCase(txtCity)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCustNo_GotFocus()
|
||||
Call FieldSelect(txtCustNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCustNo_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
txtCustNo = UCase(txtCustNo)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim oRS As Recordset, strSQL As String, strSELECT As String, strCUST As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
gintCOPY = 1
|
||||
strSQL = "SELECT * FROM ARN_InvHistoryHeader WHERE CustomerNumber = '" & strCUST & "'"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
|
||||
strSELECT = "{ARN_InvHistoryHeader.CustomerNumber}= '" & strCUST & "' and {ARN_InvHistoryHeader.JobNumber} = ''"
|
||||
crAR.ReportFileName = App.Path & "\arblanks.rpt"
|
||||
crAR.ReplaceSelectionFormula (strSELECT)
|
||||
crAR.CopiesToPrinter = 1
|
||||
crAR.Destination = crptToWindow
|
||||
crAR.Action = 1
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form ARMaster - Module Print"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDateInfo_LostFocus()
|
||||
Dim strMSG As String
|
||||
txtDueDateInfo = UCase(txtDueDateInfo)
|
||||
strMSG = Trim(txtDueDateInfo)
|
||||
MsgBox strMSG, vbOKOnly, "Invoice Due Dates"
|
||||
End Sub
|
||||
|
||||
Private Sub txtDueDateInfo_GotFocus()
|
||||
txtDueDateInfo.SelStart = 1000
|
||||
End Sub
|
||||
|
||||
Private Sub txtNAME_GotFocus()
|
||||
Call FieldSelect(txtNAME)
|
||||
End Sub
|
||||
|
||||
Private Sub txtNAME_LostFocus()
|
||||
txtNAME = UCase(txtNAME)
|
||||
End Sub
|
||||
|
||||
Private Sub txtState_GotFocus()
|
||||
Call FieldSelect(txtSTATE)
|
||||
End Sub
|
||||
|
||||
Private Sub txtState_LostFocus()
|
||||
txtSTATE = UCase(txtSTATE)
|
||||
End Sub
|
||||
|
||||
Private Sub txtZip_GotFocus()
|
||||
Call FieldSelect(txtZIP)
|
||||
txtZIP.ToolTipText = Trim(txtDueDateInfo)
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,233 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmAbout
|
||||
BorderStyle = 3 'Fixed Dialog
|
||||
Caption = "About MyApp"
|
||||
ClientHeight = 3555
|
||||
ClientLeft = 2340
|
||||
ClientTop = 1935
|
||||
ClientWidth = 5730
|
||||
ClipControls = 0 'False
|
||||
LinkTopic = "Form2"
|
||||
MaxButton = 0 'False
|
||||
MinButton = 0 'False
|
||||
ScaleHeight = 2453.724
|
||||
ScaleMode = 0 'User
|
||||
ScaleWidth = 5380.766
|
||||
ShowInTaskbar = 0 'False
|
||||
Begin VB.PictureBox picIcon
|
||||
AutoSize = -1 'True
|
||||
ClipControls = 0 'False
|
||||
Height = 540
|
||||
Left = 240
|
||||
Picture = "frmAbout.frx":0000
|
||||
ScaleHeight = 337.12
|
||||
ScaleMode = 0 'User
|
||||
ScaleWidth = 337.12
|
||||
TabIndex = 1
|
||||
Top = 240
|
||||
Width = 540
|
||||
End
|
||||
Begin VB.CommandButton cmdOK
|
||||
Cancel = -1 'True
|
||||
Caption = "OK"
|
||||
Default = -1 'True
|
||||
Height = 345
|
||||
Left = 4245
|
||||
TabIndex = 0
|
||||
Top = 2625
|
||||
Width = 1260
|
||||
End
|
||||
Begin VB.CommandButton cmdSysInfo
|
||||
Caption = "&System Info..."
|
||||
Height = 345
|
||||
Left = 4260
|
||||
TabIndex = 2
|
||||
Top = 3075
|
||||
Width = 1245
|
||||
End
|
||||
Begin VB.Line Line1
|
||||
BorderColor = &H00808080&
|
||||
BorderStyle = 6 'Inside Solid
|
||||
Index = 1
|
||||
X1 = 84.515
|
||||
X2 = 5309.398
|
||||
Y1 = 1687.583
|
||||
Y2 = 1687.583
|
||||
End
|
||||
Begin VB.Label lblDescription
|
||||
Caption = "App Description"
|
||||
ForeColor = &H00000000&
|
||||
Height = 675
|
||||
Left = 1560
|
||||
TabIndex = 3
|
||||
Top = 1620
|
||||
Width = 3375
|
||||
End
|
||||
Begin VB.Label lblTitle
|
||||
Caption = "Application Title"
|
||||
ForeColor = &H00000000&
|
||||
Height = 480
|
||||
Left = 1050
|
||||
TabIndex = 5
|
||||
Top = 240
|
||||
Width = 3885
|
||||
End
|
||||
Begin VB.Line Line1
|
||||
BorderColor = &H00FFFFFF&
|
||||
BorderWidth = 2
|
||||
Index = 0
|
||||
X1 = 98.6
|
||||
X2 = 5309.398
|
||||
Y1 = 1697.936
|
||||
Y2 = 1697.936
|
||||
End
|
||||
Begin VB.Label lblVersion
|
||||
Caption = "Version"
|
||||
Height = 225
|
||||
Left = 1050
|
||||
TabIndex = 6
|
||||
Top = 780
|
||||
Width = 3885
|
||||
End
|
||||
Begin VB.Label lblDisclaimer
|
||||
Caption = "Warning: ..."
|
||||
ForeColor = &H00000000&
|
||||
Height = 825
|
||||
Left = 255
|
||||
TabIndex = 4
|
||||
Top = 2625
|
||||
Width = 3870
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmAbout"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
' Reg Key Security Options...
|
||||
Const READ_CONTROL = &H20000
|
||||
Const KEY_QUERY_VALUE = &H1
|
||||
Const KEY_SET_VALUE = &H2
|
||||
Const KEY_CREATE_SUB_KEY = &H4
|
||||
Const KEY_ENUMERATE_SUB_KEYS = &H8
|
||||
Const KEY_NOTIFY = &H10
|
||||
Const KEY_CREATE_LINK = &H20
|
||||
Const KEY_ALL_ACCESS = KEY_QUERY_VALUE + KEY_SET_VALUE + _
|
||||
KEY_CREATE_SUB_KEY + KEY_ENUMERATE_SUB_KEYS + _
|
||||
KEY_NOTIFY + KEY_CREATE_LINK + READ_CONTROL
|
||||
|
||||
' Reg Key ROOT Types...
|
||||
Const HKEY_LOCAL_MACHINE = &H80000002
|
||||
Const ERROR_SUCCESS = 0
|
||||
Const REG_SZ = 1 ' Unicode nul terminated string
|
||||
Const REG_DWORD = 4 ' 32-bit number
|
||||
|
||||
Const gREGKEYSYSINFOLOC = "SOFTWARE\Microsoft\Shared Tools Location"
|
||||
Const gREGVALSYSINFOLOC = "MSINFO"
|
||||
Const gREGKEYSYSINFO = "SOFTWARE\Microsoft\Shared Tools\MSINFO"
|
||||
Const gREGVALSYSINFO = "PATH"
|
||||
|
||||
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, ByRef phkResult As Long) As Long
|
||||
Private Declare Function RegQueryValueEx Lib "advapi32" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, ByRef lpType As Long, ByVal lpData As String, ByRef lpcbData As Long) As Long
|
||||
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
|
||||
|
||||
|
||||
Private Sub cmdSysInfo_Click()
|
||||
Call StartSysInfo
|
||||
End Sub
|
||||
|
||||
Private Sub cmdOK_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Me.Caption = "About " & App.Title
|
||||
lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision
|
||||
lblTitle.Caption = App.Title
|
||||
End Sub
|
||||
|
||||
Public Sub StartSysInfo()
|
||||
On Error GoTo SysInfoErr
|
||||
|
||||
Dim rc As Long
|
||||
Dim SysInfoPath As String
|
||||
|
||||
' Try To Get System Info Program Path\Name From Registry...
|
||||
If GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFO, gREGVALSYSINFO, SysInfoPath) Then
|
||||
' Try To Get System Info Program Path Only From Registry...
|
||||
ElseIf GetKeyValue(HKEY_LOCAL_MACHINE, gREGKEYSYSINFOLOC, gREGVALSYSINFOLOC, SysInfoPath) Then
|
||||
' Validate Existance Of Known 32 Bit File Version
|
||||
If (Dir(SysInfoPath & "\MSINFO32.EXE") <> "") Then
|
||||
SysInfoPath = SysInfoPath & "\MSINFO32.EXE"
|
||||
|
||||
' Error - File Can Not Be Found...
|
||||
Else
|
||||
GoTo SysInfoErr
|
||||
End If
|
||||
' Error - Registry Entry Can Not Be Found...
|
||||
Else
|
||||
GoTo SysInfoErr
|
||||
End If
|
||||
|
||||
Call Shell(SysInfoPath, vbNormalFocus)
|
||||
|
||||
Exit Sub
|
||||
SysInfoErr:
|
||||
MsgBox "System Information Is Unavailable At This Time", vbOKOnly
|
||||
End Sub
|
||||
|
||||
Public Function GetKeyValue(KeyRoot As Long, KeyName As String, SubKeyRef As String, ByRef KeyVal As String) As Boolean
|
||||
Dim i As Long ' Loop Counter
|
||||
Dim rc As Long ' Return Code
|
||||
Dim hKey As Long ' Handle To An Open Registry Key
|
||||
Dim hDepth As Long '
|
||||
Dim KeyValType As Long ' Data Type Of A Registry Key
|
||||
Dim tmpVal As String ' Tempory Storage For A Registry Key Value
|
||||
Dim KeyValSize As Long ' Size Of Registry Key Variable
|
||||
'------------------------------------------------------------
|
||||
' Open RegKey Under KeyRoot {HKEY_LOCAL_MACHINE...}
|
||||
'------------------------------------------------------------
|
||||
rc = RegOpenKeyEx(KeyRoot, KeyName, 0, KEY_ALL_ACCESS, hKey) ' Open Registry Key
|
||||
|
||||
If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Error...
|
||||
|
||||
tmpVal = String$(1024, 0) ' Allocate Variable Space
|
||||
KeyValSize = 1024 ' Mark Variable Size
|
||||
|
||||
'------------------------------------------------------------
|
||||
' Retrieve Registry Key Value...
|
||||
'------------------------------------------------------------
|
||||
rc = RegQueryValueEx(hKey, SubKeyRef, 0, _
|
||||
KeyValType, tmpVal, KeyValSize) ' Get/Create Key Value
|
||||
|
||||
If (rc <> ERROR_SUCCESS) Then GoTo GetKeyError ' Handle Errors
|
||||
|
||||
If (Asc(Mid(tmpVal, KeyValSize, 1)) = 0) Then ' Win95 Adds Null Terminated String...
|
||||
tmpVal = Left(tmpVal, KeyValSize - 1) ' Null Found, Extract From String
|
||||
Else ' WinNT Does NOT Null Terminate String...
|
||||
tmpVal = Left(tmpVal, KeyValSize) ' Null Not Found, Extract String Only
|
||||
End If
|
||||
'------------------------------------------------------------
|
||||
' Determine Key Value Type For Conversion...
|
||||
'------------------------------------------------------------
|
||||
Select Case KeyValType ' Search Data Types...
|
||||
Case REG_SZ ' String Registry Key Data Type
|
||||
KeyVal = tmpVal ' Copy String Value
|
||||
Case REG_DWORD ' Double Word Registry Key Data Type
|
||||
For i = Len(tmpVal) To 1 Step -1 ' Convert Each Bit
|
||||
KeyVal = KeyVal + Hex(Asc(Mid(tmpVal, i, 1))) ' Build Value Char. By Char.
|
||||
Next
|
||||
KeyVal = Format$("&h" + KeyVal) ' Convert Double Word To String
|
||||
End Select
|
||||
|
||||
GetKeyValue = True ' Return Success
|
||||
rc = RegCloseKey(hKey) ' Close Registry Key
|
||||
Exit Function ' Exit
|
||||
|
||||
GetKeyError: ' Cleanup After An Error Has Occured...
|
||||
KeyVal = "" ' Set Return Val To Empty String
|
||||
GetKeyValue = False ' Return Failure
|
||||
rc = RegCloseKey(hKey) ' Close Registry Key
|
||||
End Function
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,597 @@
|
||||
VERSION 5.00
|
||||
Object = "{00025600-0000-0000-C000-000000000046}#5.2#0"; "Crystl32.OCX"
|
||||
Begin VB.Form frmBillingStatus
|
||||
Caption = "Billing Status"
|
||||
ClientHeight = 5835
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8385
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5835
|
||||
ScaleWidth = 8385
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdMark
|
||||
Caption = "Mark All Shipped"
|
||||
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 = 2970
|
||||
TabIndex = 10
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
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 = 1560
|
||||
TabIndex = 9
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin Crystal.CrystalReport crShipped
|
||||
Left = 4200
|
||||
Top = 5400
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "Print"
|
||||
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 = 7200
|
||||
TabIndex = 8
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
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 = 495
|
||||
Left = 5790
|
||||
TabIndex = 4
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
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 = 4380
|
||||
TabIndex = 3
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CheckBox chkShipped
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Order Shipped"
|
||||
Height = 315
|
||||
Left = 120
|
||||
TabIndex = 1
|
||||
Top = 4980
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.TextBox txtShippingDate
|
||||
Height = 315
|
||||
Left = 1200
|
||||
MaxLength = 10
|
||||
TabIndex = 2
|
||||
Top = 5460
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.ListBox lstShipping
|
||||
Height = 3765
|
||||
Left = 120
|
||||
Sorted = -1 'True
|
||||
TabIndex = 0
|
||||
Top = 180
|
||||
Width = 8115
|
||||
End
|
||||
Begin VB.Label lblAmount
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 7
|
||||
Top = 4440
|
||||
Width = 8115
|
||||
End
|
||||
Begin VB.Label lblData
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 6
|
||||
Top = 4020
|
||||
Width = 8115
|
||||
End
|
||||
Begin VB.Label lblDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Shipping Date:"
|
||||
Height = 195
|
||||
Left = 75
|
||||
TabIndex = 5
|
||||
Top = 5520
|
||||
Width = 1050
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmBillingStatus"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Dim moRSBill As Recordset, moRSInv As Recordset
|
||||
Dim mlngTRANSID As Long, mstrType As String, mstrSDate As String
|
||||
Dim mboolSHOW As Boolean, mintBOOKMARK As Integer, mintBOOKMARK18 As Integer
|
||||
Dim mstrCHECK As String
|
||||
|
||||
Private Sub BillingLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT trans_ID, lot_id, header, job_number, shipped, ship_date, Invoice_date, Inv_type, ProjLot FROM tblARInvoice WHERE header and not shipped" ' ORDER by ship_date"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstShipping.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstShipping
|
||||
gintLOTID = Field2Str2(oRS!Lot_id)
|
||||
If oRS!inv_type = "L" Then
|
||||
strTYPE = "LATH "
|
||||
ElseIf oRS!inv_type = "S" Then
|
||||
strTYPE = "STUCCO "
|
||||
ElseIf oRS!inv_type = "V" Then
|
||||
strTYPE = "STONE "
|
||||
ElseIf oRS!inv_type = "C" Then
|
||||
strTYPE = "COMPLETE"
|
||||
ElseIf oRS!inv_type = "R" Then
|
||||
strTYPE = "REPAIRS"
|
||||
End If
|
||||
strLine = ""
|
||||
strLine = Field2Str(oRS!ship_date) & " " & strTYPE & vbTab
|
||||
strLine = strLine & Format(Field2Str(oRS!job_number), "!@@@@@@@@@") & vbTab
|
||||
strLine = strLine & Field2Str(oRS!ProjLot)
|
||||
.AddItem strLine
|
||||
.ItemData(.NewIndex) = oRS!Trans_ID
|
||||
oRS.MoveNext
|
||||
End With
|
||||
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstShipping.ListCount Then
|
||||
lstShipping.ListIndex = 0
|
||||
mlngTRANSID = lstShipping.ItemData(lstShipping.ListIndex)
|
||||
Else
|
||||
mlngTRANSID = 0
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module BillingLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub chkShipped_Click()
|
||||
cmdSave.Enabled = True
|
||||
lstShipping.Enabled = False
|
||||
If chkShipped = vbChecked Then
|
||||
mstrSDate = Date
|
||||
Else
|
||||
mstrSDate = ""
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRSBill!shipped = vbChecked
|
||||
moRSBill!done = vbChecked
|
||||
moRSBill.Update
|
||||
gintLOTID = Field2Str(moRSBill!Lot_id)
|
||||
Call LotChange(moRSBill!ProjLot, "Delete An Invoice")
|
||||
Call BillingLoad
|
||||
cmdDelete.Enabled = False
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module BillingLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdMark_Click()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
On Error GoTo Error_EH
|
||||
cmdMark.Enabled = False
|
||||
lstShipping.Enabled = False
|
||||
mintBOOKMARK18 = 0
|
||||
lstShipping.ListIndex = 0
|
||||
Do Until mintBOOKMARK18 + 1 > lstShipping.ListCount
|
||||
lstShipping.ListIndex = mintBOOKMARK18
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = DateAdd("d", 3, Str2Field(txtShippingDate))
|
||||
!ship_date = Str2Field(txtShippingDate)
|
||||
!shipped = vbChecked
|
||||
' !shipped = chkShipped
|
||||
!sh_date = Date
|
||||
' !sh_date = Str2Field(mstrSDate)
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
If mintBOOKMARK18 + 1 < lstShipping.ListCount + 1 Then
|
||||
' lstShipping.ListIndex = mintBOOKMARK18 + 1
|
||||
mintBOOKMARK18 = mintBOOKMARK18 + 1
|
||||
End If
|
||||
Loop
|
||||
|
||||
Call BillingLoad
|
||||
Call FormClear
|
||||
lstShipping.Enabled = True
|
||||
lstShipping.ListIndex = -1
|
||||
|
||||
' If FormFind() Then
|
||||
' Call FormShow
|
||||
' Else
|
||||
' Call FormClear
|
||||
' End If
|
||||
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
|
||||
' mintBOOKMARK18 = 0
|
||||
' lstPOItems.ListIndex = 0
|
||||
' Do Until mintBOOKMARK18 + 1 > lstPOItems.ListCount
|
||||
' moRSUpdate!ready = vbChecked
|
||||
' moRSUpdate.Update
|
||||
' If mintBOOKMARK18 < lstPOItems.ListCount Then
|
||||
' lstPOItems.ListIndex = mintBOOKMARK18 + 1
|
||||
' mintBOOKMARK18 = mintBOOKMARK18 + 1
|
||||
' End If
|
||||
' Loop
|
||||
' Call POLoad
|
||||
' lstPOItems.ListIndex = lstPOItems.ListCount - 1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim strPDate As String, strSQL As String
|
||||
|
||||
strPDate = InputBox("Enter The Invoice Release Date to Print - (MMDDYYYY)", "Print Invoice List")
|
||||
|
||||
If Len(strPDate) > 0 Then
|
||||
strPDate = Format(strPDate, "00/00/####")
|
||||
If Not IsDate(strPDate) Then
|
||||
MsgBox "The Date You Entered is not Valid & No Report Will Print - ReEnter", vbOKOnly, "Invalid Date"
|
||||
Exit Sub
|
||||
Else
|
||||
gintPRINT = 9
|
||||
frmReport.Show 1
|
||||
' strSQL = "{tblReport.lot_id} = " & gintLOTID & " and {tblLOTINFO.lot_id} = " & gintLOTID
|
||||
strSQL = "{tblARINVOICE.SH_DATE}=Date (" & Format(strPDate, "YYYY,MM,DD") & ")"
|
||||
|
||||
crShipped.ReportFileName = App.Path & "\InvoiceList.rpt"
|
||||
crShipped.ReplaceSelectionFormula (strSQL)
|
||||
' crshipped.Destination = crptToWindow
|
||||
' crshipped.Destination = crptToPrinter
|
||||
crShipped.Destination = gintDEST
|
||||
crShipped.CopiesToPrinter = gintCOPY
|
||||
crShipped.Action = 1
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
|
||||
mintBOOKMARK = lstShipping.ListIndex
|
||||
Call FormSave
|
||||
cmdSave.Enabled = False
|
||||
cmdDelete.Enabled = False
|
||||
lstShipping.Enabled = True
|
||||
lstShipping.ListIndex = CInt(mintBOOKMARK) - 1
|
||||
' lstShipping.ListIndex = mintBOOKMARK
|
||||
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()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call BillingLoad
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - 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 tblARInvoice "
|
||||
strSQL = strSQL & "WHERE Trans_id = " & mlngTRANSID
|
||||
Set moRSBill = New Recordset
|
||||
moRSBill.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
If moRSBill.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
gintLOTID = Field2Str2(moRSBill!Lot_id)
|
||||
mstrType = Field2Str(moRSBill!inv_type)
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub FormShow()
|
||||
Dim strTYPE As String
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
|
||||
On Error GoTo Error_EH
|
||||
lblData.Caption = ""
|
||||
' If gbytSECURITY = 7 Then
|
||||
' chkShipped.Enabled = False
|
||||
' txtShippingDate.Enabled = False
|
||||
' End If
|
||||
mboolSHOW = True
|
||||
|
||||
txtShippingDate = Field2Str(moRSBill!ship_date)
|
||||
If moRSBill!inv_type = "L" Then
|
||||
strTYPE = "LATH"
|
||||
ElseIf moRSBill!inv_type = "S" Then
|
||||
strTYPE = "STUCCO"
|
||||
ElseIf moRSBill!inv_type = "C" Then
|
||||
strTYPE = "COMPLETE"
|
||||
End If
|
||||
lblData = Field2Str(moRSBill!ProjLot) & " - " & strTYPE
|
||||
lblAmount = "Invoice Date - " & Field2Str(moRSBill!invoice_date) & " Inv. Amt. " & Format(Field2Str(moRSBill!non_tax_amt), "currency")
|
||||
chkShipped = Field2CheckBox(moRSBill!shipped)
|
||||
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = DateAdd("d", 3, Str2Field(txtShippingDate))
|
||||
!ship_date = Str2Field(txtShippingDate)
|
||||
!shipped = chkShipped
|
||||
!sh_date = Str2Field(mstrSDate)
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
|
||||
Call BillingLoad
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtShippingDate = ""
|
||||
lblData = ""
|
||||
lblAmount = ""
|
||||
chkShipped = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
' Store the controls to the recordset
|
||||
Call FieldsSave
|
||||
|
||||
Call BillingLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
|
||||
|
||||
If moRSBill.State = adStateOpen Then
|
||||
moRSBill.Close
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub lstShipping_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If lstShipping.ListIndex <> -1 Then
|
||||
mlngTRANSID = lstShipping.ItemData(lstShipping.ListIndex)
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module lstShipping_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstShipping_DblClick()
|
||||
If lstShipping.ListIndex <> -1 Then
|
||||
If gbytSECURITY < 3 Then
|
||||
cmdDelete.Enabled = True
|
||||
mlngTRANSID = lstShipping.ItemData(lstShipping.ListIndex)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtShippingDate_GotFocus()
|
||||
mstrCHECK = Field2Str(txtShippingDate)
|
||||
Call FieldSelect(txtShippingDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtShippingDate_KeyPress(KeyAscii As Integer)
|
||||
If mstrCHECK <> Field2Str(txtShippingDate) Then
|
||||
cmdSave.Enabled = True
|
||||
lstShipping.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtShippingDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
If Not IsDate(txtShippingDate) Then
|
||||
lngPOS = InStr(1, txtShippingDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtShippingDate) > 0 Then
|
||||
txtShippingDate = Format(txtShippingDate, "00/00/####")
|
||||
If Not IsDate(txtShippingDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtShippingDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtShippingDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,686 @@
|
||||
VERSION 5.00
|
||||
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 frmBillingStatus
|
||||
Caption = "Billing Status"
|
||||
ClientHeight = 5835
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8385
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5835
|
||||
ScaleWidth = 8385
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin LpLib.fpList lstShipping
|
||||
Height = 3675
|
||||
Left = 120
|
||||
TabIndex = 11
|
||||
Top = 120
|
||||
Width = 8115
|
||||
_Version = 196608
|
||||
_ExtentX = 14314
|
||||
_ExtentY = 6482
|
||||
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
|
||||
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= 300
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmBillingStatus.frx":0000
|
||||
End
|
||||
Begin VB.CommandButton cmdMark
|
||||
Caption = "Mark All Invoices"
|
||||
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 = 1575
|
||||
TabIndex = 10
|
||||
Top = 4860
|
||||
Visible = 0 'False
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
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 = 2981
|
||||
TabIndex = 9
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin Crystal.CrystalReport crShipped
|
||||
Left = 4200
|
||||
Top = 5400
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "Print"
|
||||
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 = 7200
|
||||
TabIndex = 8
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
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 = 495
|
||||
Left = 5793
|
||||
TabIndex = 4
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
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 = 4387
|
||||
TabIndex = 3
|
||||
Top = 4860
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.CheckBox chkShipped
|
||||
Alignment = 1 'Right Justify
|
||||
Caption = "Order Shipped"
|
||||
Height = 315
|
||||
Left = 90
|
||||
TabIndex = 1
|
||||
Top = 4980
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.TextBox txtShippingDate
|
||||
Height = 315
|
||||
Left = 1200
|
||||
MaxLength = 10
|
||||
TabIndex = 2
|
||||
Top = 5460
|
||||
Width = 2175
|
||||
End
|
||||
Begin VB.ListBox lstShipping2
|
||||
Height = 3180
|
||||
Left = 120
|
||||
Sorted = -1 'True
|
||||
TabIndex = 0
|
||||
Top = 975
|
||||
Width = 8115
|
||||
End
|
||||
Begin VB.Label lblAmount
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 7
|
||||
Top = 4440
|
||||
Width = 8115
|
||||
End
|
||||
Begin VB.Label lblData
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 6
|
||||
Top = 4020
|
||||
Width = 8115
|
||||
End
|
||||
Begin VB.Label lblDate
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Shipping Date:"
|
||||
Height = 195
|
||||
Left = 75
|
||||
TabIndex = 5
|
||||
Top = 5520
|
||||
Width = 1050
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmBillingStatus"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Dim moRSBill As Recordset
|
||||
Dim mlngTRANSID As Long, mstrType As String, mstrSDate As String
|
||||
Dim mboolSHOW As Boolean, mintBOOKMARK As Integer
|
||||
Dim mstrCHECK As String
|
||||
|
||||
Private Sub BillingLoad()
|
||||
Dim oRS As Recordset
|
||||
Dim strSQL As String
|
||||
Dim strTYPE As String
|
||||
Dim strLine As String
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT trans_ID, lot_id, header, job_number, shipped, ship_date, Invoice_date, Inv_type, ProjLot FROM tblARInvoice WHERE header and not shipped" ' ORDER by ship_date"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstShipping.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstShipping
|
||||
gintLOTID = Field2Str2(oRS!Lot_id)
|
||||
If oRS!inv_type = "L" Then
|
||||
strTYPE = "LATH "
|
||||
ElseIf oRS!inv_type = "S" Then
|
||||
strTYPE = "STUCCO "
|
||||
ElseIf oRS!inv_type = "V" Then
|
||||
strTYPE = "STONE "
|
||||
ElseIf oRS!inv_type = "C" Then
|
||||
strTYPE = "COMPLETE"
|
||||
End If
|
||||
' strLine = ""
|
||||
strLine = Field2Str2(oRS!Trans_ID) & vbTab & Field2Str(oRS!ship_date) & vbTab & strTYPE & vbTab
|
||||
strLine = strLine & Format(Field2Str(oRS!job_number), "!@@@@@@@@@") & vbTab
|
||||
strLine = strLine & Field2Str(oRS!ProjLot)
|
||||
.AddItem strLine
|
||||
' .ItemData(.NewIndex) = oRS!trans_id
|
||||
oRS.MoveNext
|
||||
End With
|
||||
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstShipping.ListCount Then
|
||||
lstShipping.ListIndex = 0
|
||||
mlngTRANSID = lstShipping.ItemData(lstShipping.ListIndex)
|
||||
Else
|
||||
mlngTRANSID = 0
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module BillingLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub chkShipped_Click()
|
||||
cmdSave.Enabled = True
|
||||
lstShipping.Enabled = False
|
||||
If chkShipped = vbChecked Then
|
||||
mstrSDate = Date
|
||||
Else
|
||||
mstrSDate = ""
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRSBill!shipped = vbChecked
|
||||
moRSBill!done = vbChecked
|
||||
moRSBill.Update
|
||||
gintLOTID = Field2Str(moRSBill!Lot_id)
|
||||
Call LotChange(moRSBill!ProjLot, "Delete An Invoice")
|
||||
Call BillingLoad
|
||||
cmdDelete.Enabled = False
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module BillingLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdMark_Click()
|
||||
Dim intCnt As Integer
|
||||
Dim strSQL As String, oRS As Recordset
|
||||
|
||||
mintBOOKMARK = 0
|
||||
lstShipping.ListIndex = 0
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until mintBOOKMARK + 1 > lstShipping.ListCount
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = DateAdd("d", 3, Str2Field(txtShippingDate))
|
||||
!ship_date = Str2Field(txtShippingDate)
|
||||
!shipped = chkShipped
|
||||
!sh_date = Str2Field(mstrSDate)
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
|
||||
Call BillingLoad
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
|
||||
''' moRSUpdate!ready = vbChecked
|
||||
''' moRSUpdate.Update
|
||||
|
||||
''' If mintBOOKMARK < lstPOItems.ListCount Then
|
||||
''' lstPOItems.ListIndex = mintBOOKMARK + 1
|
||||
''' mintBOOKMARK = mintBOOKMARK + 1
|
||||
|
||||
''' End If
|
||||
Loop
|
||||
''' Call POLoad
|
||||
''' lstPOItems.ListIndex = lstPOItems.ListCount - 1
|
||||
|
||||
'' mintBOOKMARK = lstShipping.ListIndex
|
||||
'' lstShipping.ListIndex = 0
|
||||
'' Do Until lstShipping.ListIndex = lstShipping.ListCount - 1
|
||||
'' chkShipped = vbChecked
|
||||
|
||||
|
||||
'' Loop
|
||||
'' cmdSave.Enabled = False
|
||||
'' cmdDelete.Enabled = False
|
||||
'' lstShipping.Enabled = True
|
||||
'' lstShipping.ListIndex = mintBOOKMARK
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim strPDate As String, strSQL As String
|
||||
|
||||
strPDate = InputBox("Enter The Invoice Release Date to Print - (MMDDYYYY)", "Print Invoice List")
|
||||
|
||||
If Len(strPDate) > 0 Then
|
||||
strPDate = Format(strPDate, "00/00/####")
|
||||
If Not IsDate(strPDate) Then
|
||||
MsgBox "The Date You Entered is not Valid & No Report Will Print - ReEnter", vbOKOnly, "Invalid Date"
|
||||
Exit Sub
|
||||
Else
|
||||
gintPRINT = 9
|
||||
frmReport.Show 1
|
||||
' strSQL = "{tblReport.lot_id} = " & gintLOTID & " and {tblLOTINFO.lot_id} = " & gintLOTID
|
||||
strSQL = "{tblARINVOICE.SH_DATE}=Date (" & Format(strPDate, "YYYY,MM,DD") & ")"
|
||||
|
||||
crShipped.ReportFileName = App.Path & "\InvoiceList.rpt"
|
||||
crShipped.ReplaceSelectionFormula (strSQL)
|
||||
' crshipped.Destination = crptToWindow
|
||||
' crshipped.Destination = crptToPrinter
|
||||
crShipped.Destination = gintDEST
|
||||
crShipped.CopiesToPrinter = gintCOPY
|
||||
crShipped.Action = 1
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
|
||||
mintBOOKMARK = lstShipping.ListIndex
|
||||
Call FormSave
|
||||
cmdSave.Enabled = False
|
||||
cmdDelete.Enabled = False
|
||||
lstShipping.Enabled = True
|
||||
lstShipping.ListIndex = mintBOOKMARK
|
||||
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()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call BillingLoad
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - 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 tblARInvoice "
|
||||
strSQL = strSQL & "WHERE Trans_id = " & mlngTRANSID
|
||||
Set moRSBill = New Recordset
|
||||
moRSBill.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
If moRSBill.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
gintLOTID = Field2Str2(moRSBill!Lot_id)
|
||||
mstrType = Field2Str(moRSBill!inv_type)
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub FormShow()
|
||||
Dim strTYPE As String
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
|
||||
On Error GoTo Error_EH
|
||||
lblData.Caption = ""
|
||||
' If gbytSECURITY = 7 Then
|
||||
' chkShipped.Enabled = False
|
||||
' txtShippingDate.Enabled = False
|
||||
' End If
|
||||
mboolSHOW = True
|
||||
|
||||
txtShippingDate = Field2Str(moRSBill!ship_date)
|
||||
If moRSBill!inv_type = "L" Then
|
||||
strTYPE = "LATH"
|
||||
ElseIf moRSBill!inv_type = "S" Then
|
||||
strTYPE = "STUCCO"
|
||||
ElseIf moRSBill!inv_type = "C" Then
|
||||
strTYPE = "COMPLETE"
|
||||
End If
|
||||
lblData = Field2Str(moRSBill!ProjLot) & " - " & strTYPE
|
||||
lblAmount = "Invoice Date - " & Field2Str(moRSBill!invoice_date) & " Inv. Amt. " & Format(Field2Str(moRSBill!non_tax_amt), "currency")
|
||||
chkShipped = Field2CheckBox(moRSBill!shipped)
|
||||
|
||||
mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FieldsSave()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * FROM tblARInvoice WHERE inv_type = '" & mstrType & "' and lot_id = " & gintLOTID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
Do Until oRS.EOF
|
||||
With oRS
|
||||
!invoice_date = DateAdd("d", 3, Str2Field(txtShippingDate))
|
||||
!ship_date = Str2Field(txtShippingDate)
|
||||
!shipped = chkShipped
|
||||
!sh_date = Str2Field(mstrSDate)
|
||||
.Update
|
||||
End With
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
|
||||
Call BillingLoad
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtShippingDate = ""
|
||||
lblData = ""
|
||||
lblAmount = ""
|
||||
chkShipped = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim strName As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
' Store the controls to the recordset
|
||||
Call FieldsSave
|
||||
|
||||
Call BillingLoad
|
||||
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module FormSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
|
||||
|
||||
If moRSBill.State = adStateOpen Then
|
||||
moRSBill.Close
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub lstShipping_Click()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If lstShipping.ListIndex <> -1 Then
|
||||
' mlngTRANSID = lstShipping.ItemData(lstShipping.ListIndex)
|
||||
lstShipping.col = 0
|
||||
mlngTRANSID = lstShipping.ColText
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
Else
|
||||
Call FormClear
|
||||
End If
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form BillingStatus - Module lstShipping_Click"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstShipping_DblClick()
|
||||
If lstShipping.ListIndex <> -1 Then
|
||||
If gbytSECURITY < 3 Then
|
||||
cmdDelete.Enabled = True
|
||||
mlngTRANSID = lstShipping.ItemData(lstShipping.ListIndex)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtShippingDate_GotFocus()
|
||||
mstrCHECK = Field2Str(txtShippingDate)
|
||||
Call FieldSelect(txtShippingDate)
|
||||
End Sub
|
||||
|
||||
Private Sub txtShippingDate_KeyPress(KeyAscii As Integer)
|
||||
If mstrCHECK <> Field2Str(txtShippingDate) Then
|
||||
cmdSave.Enabled = True
|
||||
lstShipping.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtShippingDate_LostFocus()
|
||||
Dim lngPOS As Long
|
||||
|
||||
If Not IsDate(txtShippingDate) Then
|
||||
lngPOS = InStr(1, txtShippingDate, "/", 1)
|
||||
If lngPOS = 0 Then
|
||||
If Len(txtShippingDate) > 0 Then
|
||||
txtShippingDate = Format(txtShippingDate, "00/00/####")
|
||||
If Not IsDate(txtShippingDate) Then
|
||||
MsgBox "The Date You Entered is not Valid - ReEnter"
|
||||
txtShippingDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
||||
txtShippingDate.SetFocus
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
VERSION 5.00
|
||||
Object = "{DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0"; "TODG7.OCX"
|
||||
Begin VB.Form frmBlackPaper
|
||||
Caption = "Black Paper Types"
|
||||
ClientHeight = 4410
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 7155
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4410
|
||||
ScaleWidth = 7155
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "Exit"
|
||||
Height = 555
|
||||
Left = 5700
|
||||
TabIndex = 8
|
||||
Top = 3300
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
Height = 555
|
||||
Left = 3820
|
||||
TabIndex = 7
|
||||
Top = 3300
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
Height = 555
|
||||
Left = 1940
|
||||
TabIndex = 6
|
||||
Top = 3300
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
Height = 555
|
||||
Left = 60
|
||||
TabIndex = 5
|
||||
Top = 3300
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Height = 300
|
||||
Left = 2880
|
||||
Picture = "frmBlackPaper.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 4
|
||||
Top = 4020
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Height = 300
|
||||
Left = 3240
|
||||
Picture = "frmBlackPaper.frx":0342
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 3
|
||||
Top = 4020
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Height = 300
|
||||
Left = 3585
|
||||
Picture = "frmBlackPaper.frx":0684
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 2
|
||||
Top = 4020
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdLast
|
||||
Height = 300
|
||||
Left = 3945
|
||||
Picture = "frmBlackPaper.frx":09C6
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 1
|
||||
Top = 4020
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin TrueOleDBGrid70.TDBGrid TDBGLabor
|
||||
Height = 3135
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 60
|
||||
Width = 7020
|
||||
_ExtentX = 12383
|
||||
_ExtentY = 5530
|
||||
_LayoutType = 4
|
||||
_RowHeight = -2147483647
|
||||
_WasPersistedAsPixels= 0
|
||||
Columns(0)._VlistStyle= 0
|
||||
Columns(0)._MaxComboItems= 5
|
||||
Columns(0).Caption= "Black Paper Type"
|
||||
Columns(0).DataField= "bp_type"
|
||||
Columns(0).DataWidth= 2
|
||||
Columns(0)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(1)._VlistStyle= 0
|
||||
Columns(1)._MaxComboItems= 5
|
||||
Columns(1).Caption= "Description"
|
||||
Columns(1).DataField= "desc"
|
||||
Columns(1).DataWidth= 40
|
||||
Columns(1)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns.Count = 2
|
||||
Splits(0)._UserFlags= 0
|
||||
Splits(0).RecordSelectorWidth= 503
|
||||
Splits(0)._SavedRecordSelectors= 0 'False
|
||||
Splits(0).DividerColor= 12632256
|
||||
Splits(0).SpringMode= 0 'False
|
||||
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
|
||||
Splits(0)._ColumnProps(0)= "Columns.Count=2"
|
||||
Splits(0)._ColumnProps(1)= "Column(0).Width=2725"
|
||||
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
|
||||
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=2646"
|
||||
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
|
||||
Splits(0)._ColumnProps(5)= "Column(1).Width=8996"
|
||||
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
|
||||
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=8916"
|
||||
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
|
||||
Splits.Count = 1
|
||||
PrintInfos(0)._StateFlags= 0
|
||||
PrintInfos(0).Name= "piInternal 0"
|
||||
PrintInfos(0).PageHeaderFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageFooterFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageHeaderHeight= 0
|
||||
PrintInfos(0).PageFooterHeight= 0
|
||||
PrintInfos.Count= 1
|
||||
AllowDelete = -1 'True
|
||||
AllowAddNew = -1 'True
|
||||
DefColWidth = 0
|
||||
HeadLines = 1
|
||||
FootLines = 1
|
||||
MultipleLines = 0
|
||||
CellTipsWidth = 0
|
||||
DeadAreaBackColor= 12632256
|
||||
RowDividerColor = 12632256
|
||||
RowSubDividerColor= 12632256
|
||||
DirectionAfterEnter= 1
|
||||
MaxRows = 250000
|
||||
ViewColumnCaptionWidth= 0
|
||||
ViewColumnWidth = 0
|
||||
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
|
||||
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
|
||||
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
|
||||
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
|
||||
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=825,.italic=0"
|
||||
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(5) = ":id=0,.fontname=MS Sans Serif"
|
||||
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
|
||||
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
|
||||
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34"
|
||||
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
|
||||
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
|
||||
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
|
||||
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
|
||||
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
|
||||
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
|
||||
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
|
||||
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
|
||||
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
|
||||
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
|
||||
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
|
||||
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
|
||||
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
|
||||
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
|
||||
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
|
||||
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
|
||||
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
|
||||
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
|
||||
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
|
||||
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
|
||||
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=28,.parent=13"
|
||||
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=25,.parent=14"
|
||||
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=26,.parent=15"
|
||||
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=27,.parent=17"
|
||||
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=32,.parent=13"
|
||||
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=29,.parent=14"
|
||||
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=30,.parent=15"
|
||||
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=31,.parent=17"
|
||||
_StyleDefs(38) = "Named:id=33:Normal"
|
||||
_StyleDefs(39) = ":id=33,.parent=0"
|
||||
_StyleDefs(40) = "Named:id=34:Heading"
|
||||
_StyleDefs(41) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(42) = ":id=34,.wraptext=-1"
|
||||
_StyleDefs(43) = "Named:id=35:Footing"
|
||||
_StyleDefs(44) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(45) = "Named:id=36:Selected"
|
||||
_StyleDefs(46) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(47) = "Named:id=37:Caption"
|
||||
_StyleDefs(48) = ":id=37,.parent=34,.alignment=2"
|
||||
_StyleDefs(49) = "Named:id=38:HighlightRow"
|
||||
_StyleDefs(50) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(51) = "Named:id=39:EvenRow"
|
||||
_StyleDefs(52) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
|
||||
_StyleDefs(53) = "Named:id=40:OddRow"
|
||||
_StyleDefs(54) = ":id=40,.parent=33"
|
||||
_StyleDefs(55) = "Named:id=41:RecordSelector"
|
||||
_StyleDefs(56) = ":id=41,.parent=34"
|
||||
_StyleDefs(57) = "Named:id=42:FilterBar"
|
||||
_StyleDefs(58) = ":id=42,.parent=33"
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmBlackPaper"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRS As Recordset
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
moRS.AddNew
|
||||
TDBGLabor.SetFocus
|
||||
cmdExit.Caption = "&Cancel"
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
If TDBGLabor.Text = "" Then
|
||||
TDBGLabor.Text = "aa"
|
||||
moRS.Delete
|
||||
cmdExit.Caption = "&Exit"
|
||||
Else
|
||||
moRS.Delete
|
||||
cmdExit.Caption = "&Exit"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
If cmdExit.Caption = "&Exit" Then
|
||||
Unload Me
|
||||
Else
|
||||
moRS.CancelUpdate
|
||||
cmdExit.Caption = "&Exit"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
moRS.MoveFirst
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
moRS.MoveLast
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
moRS.MoveNext
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
moRS.MovePrevious
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
moRS.Update
|
||||
cmdExit.Caption = "&Exit"
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Call LoadLabor
|
||||
TDBGLabor.DataSource = moRS
|
||||
TDBGLabor.ReBind
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadLabor()
|
||||
Dim strSQL As String
|
||||
|
||||
strSQL = "SELECT * FROM tblBPType"
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,448 @@
|
||||
VERSION 5.00
|
||||
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
|
||||
Begin VB.Form frmBlackPaper1
|
||||
Caption = "Black Paper Options"
|
||||
ClientHeight = 4245
|
||||
ClientLeft = 1110
|
||||
ClientTop = 345
|
||||
ClientWidth = 5745
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4245
|
||||
ScaleWidth = 5745
|
||||
Begin VB.PictureBox picButtons
|
||||
Align = 2 'Align Bottom
|
||||
Appearance = 0 'Flat
|
||||
BorderStyle = 0 'None
|
||||
ForeColor = &H80000008&
|
||||
Height = 300
|
||||
Left = 0
|
||||
ScaleHeight = 300
|
||||
ScaleWidth = 5745
|
||||
TabIndex = 7
|
||||
Top = 3645
|
||||
Width = 5745
|
||||
Begin VB.CommandButton cmdCancel
|
||||
Caption = "&Cancel"
|
||||
Height = 300
|
||||
Left = 1675
|
||||
TabIndex = 13
|
||||
Top = 0
|
||||
Visible = 0 'False
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdUpdate
|
||||
Caption = "&Update"
|
||||
Height = 300
|
||||
Left = 290
|
||||
TabIndex = 12
|
||||
Top = 0
|
||||
Visible = 0 'False
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdClose
|
||||
Caption = "&Close"
|
||||
Height = 300
|
||||
Left = 4445
|
||||
TabIndex = 11
|
||||
Top = 0
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "&Delete"
|
||||
Height = 300
|
||||
Left = 3060
|
||||
TabIndex = 10
|
||||
Top = 0
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdEdit
|
||||
Caption = "&Edit"
|
||||
Height = 300
|
||||
Left = 1675
|
||||
TabIndex = 9
|
||||
Top = 0
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "&Add"
|
||||
Height = 300
|
||||
Left = 290
|
||||
TabIndex = 8
|
||||
Top = 0
|
||||
Width = 1095
|
||||
End
|
||||
End
|
||||
Begin VB.PictureBox picStatBox
|
||||
Align = 2 'Align Bottom
|
||||
Appearance = 0 'Flat
|
||||
BorderStyle = 0 'None
|
||||
ForeColor = &H80000008&
|
||||
Height = 300
|
||||
Left = 0
|
||||
ScaleHeight = 300
|
||||
ScaleWidth = 5745
|
||||
TabIndex = 1
|
||||
Top = 3945
|
||||
Width = 5745
|
||||
Begin VB.CommandButton cmdLast
|
||||
Height = 300
|
||||
Left = 4545
|
||||
Picture = "frmBlackPaper1.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 5
|
||||
Top = 0
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Height = 300
|
||||
Left = 4200
|
||||
Picture = "frmBlackPaper1.frx":0342
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 4
|
||||
Top = 0
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Height = 300
|
||||
Left = 345
|
||||
Picture = "frmBlackPaper1.frx":0684
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 3
|
||||
Top = 0
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Height = 300
|
||||
Left = 0
|
||||
Picture = "frmBlackPaper1.frx":09C6
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 2
|
||||
Top = 0
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.Label lblStatus
|
||||
BackColor = &H00FFFFFF&
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 285
|
||||
Left = 690
|
||||
TabIndex = 6
|
||||
Top = 0
|
||||
Width = 3360
|
||||
End
|
||||
End
|
||||
Begin MSDataGridLib.DataGrid grdDataGrid
|
||||
Align = 1 'Align Top
|
||||
Height = 3495
|
||||
Left = 0
|
||||
TabIndex = 0
|
||||
Top = 0
|
||||
Width = 5745
|
||||
_ExtentX = 10134
|
||||
_ExtentY = 6165
|
||||
_Version = 393216
|
||||
AllowUpdate = -1 'True
|
||||
AllowArrows = -1 'True
|
||||
HeadLines = 1
|
||||
RowHeight = 15
|
||||
TabAction = 1
|
||||
AllowAddNew = -1 'True
|
||||
AllowDelete = -1 'True
|
||||
BeginProperty HeadFont {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
|
||||
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
|
||||
ColumnCount = 2
|
||||
BeginProperty Column00
|
||||
DataField = ""
|
||||
Caption = ""
|
||||
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
|
||||
Type = 0
|
||||
Format = ""
|
||||
HaveTrueFalseNull= 0
|
||||
FirstDayOfWeek = 0
|
||||
FirstWeekOfYear = 0
|
||||
LCID = 1033
|
||||
SubFormatType = 0
|
||||
EndProperty
|
||||
EndProperty
|
||||
BeginProperty Column01
|
||||
DataField = ""
|
||||
Caption = ""
|
||||
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
|
||||
Type = 0
|
||||
Format = ""
|
||||
HaveTrueFalseNull= 0
|
||||
FirstDayOfWeek = 0
|
||||
FirstWeekOfYear = 0
|
||||
LCID = 1033
|
||||
SubFormatType = 0
|
||||
EndProperty
|
||||
EndProperty
|
||||
SplitCount = 1
|
||||
BeginProperty Split0
|
||||
BeginProperty Column00
|
||||
EndProperty
|
||||
BeginProperty Column01
|
||||
EndProperty
|
||||
EndProperty
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmBlackPaper1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Dim WithEvents adoPrimaryRS As Recordset
|
||||
Attribute adoPrimaryRS.VB_VarHelpID = -1
|
||||
Dim mbChangedByCode As Boolean
|
||||
Dim mvBookMark As Variant
|
||||
Dim mbEditFlag As Boolean
|
||||
Dim mbAddNewFlag As Boolean
|
||||
Dim mbDataChanged As Boolean
|
||||
|
||||
Private Sub Form_Load()
|
||||
Dim db As Connection
|
||||
Set db = New Connection
|
||||
db.CursorLocation = adUseClient
|
||||
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\VWP\VWP.mdb;"
|
||||
|
||||
Set adoPrimaryRS = New Recordset
|
||||
adoPrimaryRS.Open "select BP_TYPE,DESC from BPTYPE Order by BP_TYPE", db, adOpenStatic, adLockOptimistic
|
||||
|
||||
Set grdDataGrid.DataSource = adoPrimaryRS
|
||||
|
||||
|
||||
mbDataChanged = False
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Resize()
|
||||
On Error Resume Next
|
||||
'This will resize the grid when the form is resized
|
||||
grdDataGrid.Height = Me.ScaleHeight - 30 - picButtons.Height - picStatBox.Height
|
||||
lblStatus.Width = Me.Width - 1500
|
||||
cmdNext.Left = lblStatus.Width + 700
|
||||
cmdLast.Left = cmdNext.Left + 340
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
If mbEditFlag Or mbAddNewFlag Then Exit Sub
|
||||
|
||||
Select Case KeyCode
|
||||
Case vbKeyEscape
|
||||
cmdClose_Click
|
||||
Case vbKeyEnd
|
||||
cmdLast_Click
|
||||
Case vbKeyHome
|
||||
cmdFirst_Click
|
||||
Case vbKeyUp, vbKeyPageUp
|
||||
If Shift = vbCtrlMask Then
|
||||
cmdFirst_Click
|
||||
Else
|
||||
cmdPrevious_Click
|
||||
End If
|
||||
Case vbKeyDown, vbKeyPageDown
|
||||
If Shift = vbCtrlMask Then
|
||||
cmdLast_Click
|
||||
Else
|
||||
cmdNext_Click
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Unload(Cancel As Integer)
|
||||
Screen.MousePointer = vbDefault
|
||||
End Sub
|
||||
|
||||
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
|
||||
'This will display the current record position for this recordset
|
||||
lblStatus.Caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition)
|
||||
End Sub
|
||||
|
||||
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
|
||||
'This is where you put validation code
|
||||
'This event gets called when the following actions occur
|
||||
Dim bCancel As Boolean
|
||||
|
||||
Select Case adReason
|
||||
Case adRsnAddNew
|
||||
Case adRsnClose
|
||||
Case adRsnDelete
|
||||
Case adRsnFirstChange
|
||||
Case adRsnMove
|
||||
Case adRsnRequery
|
||||
Case adRsnResynch
|
||||
Case adRsnUndoAddNew
|
||||
Case adRsnUndoDelete
|
||||
Case adRsnUndoUpdate
|
||||
Case adRsnUpdate
|
||||
End Select
|
||||
|
||||
If bCancel Then adStatus = adStatusCancel
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
On Error GoTo AddErr
|
||||
adoPrimaryRS.MoveLast
|
||||
adoPrimaryRS.AddNew
|
||||
grdDataGrid.SetFocus
|
||||
|
||||
Exit Sub
|
||||
AddErr:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
On Error GoTo DeleteErr
|
||||
With adoPrimaryRS
|
||||
.Delete
|
||||
.MoveNext
|
||||
If .EOF Then .MoveLast
|
||||
End With
|
||||
Exit Sub
|
||||
DeleteErr:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub cmdEdit_Click()
|
||||
On Error GoTo EditErr
|
||||
|
||||
lblStatus.Caption = "Edit record"
|
||||
mbEditFlag = True
|
||||
SetButtons False
|
||||
Exit Sub
|
||||
|
||||
EditErr:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
Private Sub cmdCancel_Click()
|
||||
On Error Resume Next
|
||||
|
||||
SetButtons True
|
||||
mbEditFlag = False
|
||||
mbAddNewFlag = False
|
||||
adoPrimaryRS.CancelUpdate
|
||||
If mvBookMark > 0 Then
|
||||
adoPrimaryRS.Bookmark = mvBookMark
|
||||
Else
|
||||
adoPrimaryRS.MoveFirst
|
||||
End If
|
||||
mbDataChanged = False
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdUpdate_Click()
|
||||
On Error GoTo UpdateErr
|
||||
|
||||
adoPrimaryRS.UpdateBatch adAffectAll
|
||||
|
||||
If mbAddNewFlag Then
|
||||
adoPrimaryRS.MoveLast 'move to the new record
|
||||
End If
|
||||
|
||||
mbEditFlag = False
|
||||
mbAddNewFlag = False
|
||||
SetButtons True
|
||||
mbDataChanged = False
|
||||
|
||||
Exit Sub
|
||||
UpdateErr:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub cmdClose_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
On Error GoTo GoFirstError
|
||||
|
||||
adoPrimaryRS.MoveFirst
|
||||
mbDataChanged = False
|
||||
|
||||
Exit Sub
|
||||
|
||||
GoFirstError:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
On Error GoTo GoLastError
|
||||
|
||||
adoPrimaryRS.MoveLast
|
||||
mbDataChanged = False
|
||||
|
||||
Exit Sub
|
||||
|
||||
GoLastError:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
On Error GoTo GoNextError
|
||||
|
||||
If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext
|
||||
If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then
|
||||
Beep
|
||||
'moved off the end so go back
|
||||
adoPrimaryRS.MoveLast
|
||||
End If
|
||||
'show the current record
|
||||
mbDataChanged = False
|
||||
|
||||
Exit Sub
|
||||
GoNextError:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
On Error GoTo GoPrevError
|
||||
|
||||
If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious
|
||||
If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then
|
||||
Beep
|
||||
'moved off the end so go back
|
||||
adoPrimaryRS.MoveFirst
|
||||
End If
|
||||
'show the current record
|
||||
mbDataChanged = False
|
||||
|
||||
Exit Sub
|
||||
|
||||
GoPrevError:
|
||||
MsgBox Err.Description
|
||||
End Sub
|
||||
|
||||
Private Sub SetButtons(bVal As Boolean)
|
||||
cmdAdd.Visible = bVal
|
||||
cmdEdit.Visible = bVal
|
||||
cmdUpdate.Visible = Not bVal
|
||||
cmdCancel.Visible = Not bVal
|
||||
cmdDelete.Visible = bVal
|
||||
cmdClose.Visible = bVal
|
||||
cmdNext.Enabled = bVal
|
||||
cmdFirst.Enabled = bVal
|
||||
cmdLast.Enabled = bVal
|
||||
cmdPrevious.Enabled = bVal
|
||||
End Sub
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
VERSION 5.00
|
||||
Object = "{C4847593-972C-11D0-9567-00A0C9273C2A}#2.2#0"; "CRVIEWER.DLL"
|
||||
Begin VB.Form frmCR3
|
||||
Caption = "Form3"
|
||||
ClientHeight = 3195
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 4680
|
||||
LinkTopic = "Form3"
|
||||
ScaleHeight = 3195
|
||||
ScaleWidth = 4680
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin CRVIEWERLibCtl.CRViewer CRViewer1
|
||||
Height = 7005
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 0
|
||||
Width = 5805
|
||||
DisplayGroupTree= -1 'True
|
||||
DisplayToolbar = -1 'True
|
||||
EnableGroupTree = -1 'True
|
||||
EnableNavigationControls= -1 'True
|
||||
EnableStopButton= -1 'True
|
||||
EnablePrintButton= -1 'True
|
||||
EnableZoomControl= -1 'True
|
||||
EnableCloseButton= -1 'True
|
||||
EnableProgressControl= -1 'True
|
||||
EnableSearchControl= -1 'True
|
||||
EnableRefreshButton= 0 'False
|
||||
EnableDrillDown = -1 'True
|
||||
EnableAnimationControl= 0 'False
|
||||
EnableSelectExpertButton= 0 'False
|
||||
EnableToolbar = -1 'True
|
||||
DisplayBorder = 0 'False
|
||||
DisplayTabs = -1 'True
|
||||
DisplayBackgroundEdge= -1 'True
|
||||
SelectionFormula= ""
|
||||
EnablePopupMenu = -1 'True
|
||||
EnableExportButton= 0 'False
|
||||
EnableSearchExpertButton= 0 'False
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmCR3"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Dim Report As New CrystalReport2
|
||||
|
||||
Option Explicit
|
||||
|
||||
Private Sub Form_Load()
|
||||
Screen.MousePointer = vbHourglass
|
||||
CRViewer1.ReportSource = Report
|
||||
CRViewer1.ViewReport
|
||||
Screen.MousePointer = vbDefault
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Resize()
|
||||
CRViewer1.Top = 0
|
||||
CRViewer1.Left = 0
|
||||
CRViewer1.Height = ScaleHeight
|
||||
CRViewer1.Width = ScaleWidth
|
||||
|
||||
End Sub
|
||||
@@ -0,0 +1,911 @@
|
||||
VERSION 5.00
|
||||
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 frmCertified
|
||||
Caption = "Certified Labor Rate Information"
|
||||
ClientHeight = 4785
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 9645
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 9.75
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 4785
|
||||
ScaleWidth = 9645
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin Crystal.CrystalReport crEmpList
|
||||
Left = 7980
|
||||
Top = -105
|
||||
_ExtentX = 741
|
||||
_ExtentY = 741
|
||||
_Version = 348160
|
||||
PrintFileLinesPerPage= 60
|
||||
End
|
||||
Begin VB.CommandButton cmdPrint
|
||||
Caption = "Print"
|
||||
Height = 465
|
||||
Left = 1965
|
||||
TabIndex = 19
|
||||
Top = 630
|
||||
Visible = 0 'False
|
||||
Width = 900
|
||||
End
|
||||
Begin VB.ComboBox cboSort
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 315
|
||||
ItemData = "frmCertified.frx":0000
|
||||
Left = 3885
|
||||
List = "frmCertified.frx":0010
|
||||
Style = 2 'Dropdown List
|
||||
TabIndex = 18
|
||||
Top = 795
|
||||
Width = 2220
|
||||
End
|
||||
Begin VB.TextBox txtSearch
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 315
|
||||
Left = 6180
|
||||
TabIndex = 17
|
||||
Top = 810
|
||||
Width = 3435
|
||||
End
|
||||
Begin VB.TextBox txtWCCode
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 285
|
||||
Left = 4320
|
||||
TabIndex = 3
|
||||
Top = 0
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.TextBox txtFName
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 285
|
||||
Left = 5460
|
||||
TabIndex = 5
|
||||
Top = 300
|
||||
Width = 4140
|
||||
End
|
||||
Begin VB.TextBox txtLName
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 285
|
||||
Left = 1035
|
||||
MaxLength = 30
|
||||
TabIndex = 4
|
||||
Top = 315
|
||||
Width = 3075
|
||||
End
|
||||
Begin VB.TextBox txtEmpNo
|
||||
Enabled = 0 'False
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 285
|
||||
Left = 2295
|
||||
MaxLength = 7
|
||||
TabIndex = 2
|
||||
Top = 0
|
||||
Width = 1035
|
||||
End
|
||||
Begin VB.TextBox txtDept
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 285
|
||||
Left = 705
|
||||
TabIndex = 1
|
||||
Top = 0
|
||||
Width = 480
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "Exit"
|
||||
Height = 465
|
||||
Left = 2895
|
||||
TabIndex = 8
|
||||
Top = 630
|
||||
Width = 900
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
Enabled = 0 'False
|
||||
Height = 465
|
||||
Left = 1035
|
||||
TabIndex = 6
|
||||
Top = 630
|
||||
Width = 900
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
Height = 465
|
||||
Left = 90
|
||||
TabIndex = 7
|
||||
Top = 630
|
||||
Width = 900
|
||||
End
|
||||
Begin LpLib.fpList lstEmpList
|
||||
Height = 3195
|
||||
Left = 30
|
||||
TabIndex = 0
|
||||
Top = 1215
|
||||
Width = 9570
|
||||
_Version = 196608
|
||||
_ExtentX = 16880
|
||||
_ExtentY = 5636
|
||||
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 = 6
|
||||
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= 195
|
||||
GrpsFrozen = 0
|
||||
BorderGrayAreaColor= -2147483637
|
||||
ExtendRow = 0
|
||||
DataField = ""
|
||||
OLEDragMode = 0
|
||||
OLEDropMode = 0
|
||||
EnableClickEvent= -1 'True
|
||||
Redraw = -1 'True
|
||||
ResizeRowToFont = 0 'False
|
||||
TextTipMultiLine= 0
|
||||
ColDesigner = "frmCertified.frx":003D
|
||||
End
|
||||
Begin VB.Label lblSearch
|
||||
AutoSize = -1 'True
|
||||
Caption = "Enter Employee No Search Info:"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 6180
|
||||
TabIndex = 16
|
||||
Top = 585
|
||||
Width = 2280
|
||||
End
|
||||
Begin VB.Label lblSort
|
||||
AutoSize = -1 'True
|
||||
Caption = "Sort Field:"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 3915
|
||||
TabIndex = 15
|
||||
Top = 585
|
||||
Width = 705
|
||||
End
|
||||
Begin VB.Label lblIntr
|
||||
Alignment = 2 'Center
|
||||
Caption = "Double Click Hi-Lited Selection To Edit"
|
||||
ForeColor = &H000000FF&
|
||||
Height = 285
|
||||
Left = 60
|
||||
TabIndex = 14
|
||||
Top = 4470
|
||||
Width = 9540
|
||||
End
|
||||
Begin VB.Label lblWCCode
|
||||
AutoSize = -1 'True
|
||||
Caption = "Labor Rate: "
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 3420
|
||||
TabIndex = 13
|
||||
Top = 75
|
||||
Width = 885
|
||||
End
|
||||
Begin VB.Label lblFName
|
||||
AutoSize = -1 'True
|
||||
Caption = "Labor Description: "
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 4170
|
||||
TabIndex = 12
|
||||
Top = 375
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.Label lblLName
|
||||
AutoSize = -1 'True
|
||||
Caption = "Project Desc: "
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 30
|
||||
TabIndex = 11
|
||||
Top = 375
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblEmpNo
|
||||
AutoSize = -1 'True
|
||||
Caption = "Project Code: "
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 1245
|
||||
TabIndex = 10
|
||||
Top = 75
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblDept
|
||||
AutoSize = -1 'True
|
||||
Caption = "Proj ID: "
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 400
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 195
|
||||
Left = 150
|
||||
TabIndex = 9
|
||||
Top = 75
|
||||
Width = 570
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmCertified"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim mboolSHOW As Boolean, mboolADD As Boolean
|
||||
Dim moRSEMP As Recordset, mintBOOKMARK As Integer
|
||||
Dim mbytSort As Byte
|
||||
|
||||
Private Sub FieldSave()
|
||||
Dim oRS As Recordset, strSQL As String
|
||||
|
||||
If mboolADD Then
|
||||
strSQL = "SELECT * FROM tblCERTIFIED"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenDynamic, adLockPessimistic
|
||||
|
||||
If Not oRS.EOF Then
|
||||
oRS.AddNew
|
||||
oRS!PROJ_ID = Field2Str(txtDept)
|
||||
oRS!Proj_Code = Field2Str(txtEmpNo)
|
||||
oRS!Proj_Desc = Field2Str(txtLName)
|
||||
oRS!LaborDesc = Field2Str(txtFName)
|
||||
oRS!Rate = Field2Str(txtWCCode)
|
||||
' oRS!Terminated = Field2Str(txtStatus)
|
||||
' oRS!SocialSecurityNumber = Field2Str(txtSS)
|
||||
oRS.Update
|
||||
mboolADD = False
|
||||
End If
|
||||
Exit Sub
|
||||
End If
|
||||
With moRSEMP
|
||||
!PROJ_ID = Field2Str(txtDept)
|
||||
!Proj_Code = Field2Str(txtEmpNo)
|
||||
!Proj_Desc = Field2Str(txtLName)
|
||||
!LaborDesc = Field2Str(txtFName)
|
||||
!Rate = Field2Str(txtWCCode)
|
||||
' !SocialSecurityNumber = Field2Str(txtSS)
|
||||
' !Terminated = Field2Str(txtStatus)
|
||||
.Update
|
||||
End With
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EmpLoad()
|
||||
Dim oRS As Recordset, moRSEMP As Recordset
|
||||
Dim strSQL As String, strCREW As String
|
||||
Dim strLine As String
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
strSQL = "SELECT * from tblCERTIFIED"
|
||||
Set moRSEMP = New Recordset
|
||||
moRSEMP.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
lstEmpList.Clear
|
||||
|
||||
Do Until moRSEMP.EOF
|
||||
With lstEmpList
|
||||
strLine = Field2Str(moRSEMP!CertID) & vbTab & Field2Str(moRSEMP!PROJ_ID) & vbTab & Field2Str(moRSEMP!Proj_Code)
|
||||
strLine = strLine & vbTab & Field2Str(moRSEMP!Proj_Desc) & vbTab & Format(Field2Str(moRSEMP!Rate), "#,#.00 ") & vbTab & Field2Str(moRSEMP!LaborDesc) ' & vbTab & Field2Str(moRSEMP!SocialSecurityNumber)
|
||||
.AddItem strLine
|
||||
' .ItemData(.NewIndex) = moRSEMP!emp_id
|
||||
End With
|
||||
|
||||
moRSEMP.MoveNext
|
||||
Loop
|
||||
moRSEMP.Close
|
||||
|
||||
If lstEmpList.ListCount Then
|
||||
lstEmpList.ListIndex = 0
|
||||
Else
|
||||
lstEmpList.ListIndex = -1
|
||||
' cmdDelete.Enabled = False
|
||||
End If
|
||||
Exit Sub
|
||||
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form CrewList - Module EmpLoad"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
' mboolbookmark = lstEmpList.ListIndex
|
||||
mboolADD = True
|
||||
txtEmpNo.Enabled = True
|
||||
cmdAdd.Enabled = False
|
||||
cmdSave.Enabled = True
|
||||
Call FormClear
|
||||
txtDept.SetFocus
|
||||
' lstEmpList.ListIndex = mintBOOKMARK
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtEmpNo.Enabled = True
|
||||
txtDept = ""
|
||||
txtEmpNo = ""
|
||||
txtFName = ""
|
||||
txtLName = ""
|
||||
txtWCCode = ""
|
||||
lstEmpList.Enabled = False
|
||||
' txtSS = ""
|
||||
' txtStatus = ""
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrint_Click()
|
||||
Dim intYN As Integer, strMSG As String
|
||||
|
||||
strMSG = "Do You Want A Report Sorted By Certified Job Number"
|
||||
intYN = MsgBox(strMSG, vbYesNo, "Sort By Job Number")
|
||||
If intYN = vbYes Then
|
||||
Call PrintEmpNo
|
||||
ElseIf intYN = vbNo Then
|
||||
intYN = MsgBox("Do You Want To Print A Report Sorted By Last Name", vbYesNo, "Sort By Last Name")
|
||||
If intYN = vbYes Then
|
||||
Call PrintLName
|
||||
ElseIf intYN = vbNo Then
|
||||
intYN = MsgBox("Do You Want To Print A Report Sorted By First Name?", vbYesNo, "Sorted By First Name")
|
||||
If intYN = vbYes Then
|
||||
Call PrintFName
|
||||
ElseIf intYN = vbNo Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PrintEmpNo()
|
||||
Dim intYN As Integer, strMSG As String
|
||||
|
||||
intYN = MsgBox("Do You Want To Print To Screen?", vbYesNo, "Print To Screen")
|
||||
If intYN = vbYes Then
|
||||
crEmpList.Destination = crptToWindow
|
||||
Else
|
||||
crEmpList.Destination = crptToPrinter
|
||||
End If
|
||||
crEmpList.ReportFileName = App.Path & "\EmpListByEmpNo.rpt"
|
||||
' crEmpList.Destination = crptToPrinter
|
||||
'EmpListByEmpLN
|
||||
'EmpListByEmpFN
|
||||
crEmpList.Action = 1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PrintLName()
|
||||
Dim intYN As Integer, strMSG As String
|
||||
|
||||
intYN = MsgBox("Do You Want To Print To Screen?", vbYesNo, "Print To Screen")
|
||||
If intYN = vbYes Then
|
||||
crEmpList.Destination = crptToWindow
|
||||
Else
|
||||
crEmpList.Destination = crptToPrinter
|
||||
End If
|
||||
crEmpList.ReportFileName = App.Path & "\EmpListByEmpLN.rpt"
|
||||
' crEmpList.Destination = crptToPrinter
|
||||
'EmpListByEmpLN
|
||||
'EmpListByEmpFN
|
||||
crEmpList.Action = 1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PrintFName()
|
||||
Dim intYN As Integer, strMSG As String
|
||||
|
||||
intYN = MsgBox("Do You Want To Print To Screen?", vbYesNo, "Print To Screen")
|
||||
If intYN = vbYes Then
|
||||
crEmpList.Destination = crptToWindow
|
||||
Else
|
||||
crEmpList.Destination = crptToPrinter
|
||||
End If
|
||||
crEmpList.ReportFileName = App.Path & "\EmpListByEmpFN.rpt"
|
||||
' crEmpList.Destination = crptToPrinter
|
||||
'EmpListByEmpLN
|
||||
'EmpListByEmpFN
|
||||
crEmpList.Action = 1
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
mintBOOKMARK = lstEmpList.ListIndex
|
||||
Call FieldSave
|
||||
Call EmpLoad
|
||||
cmdAdd.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
txtEmpNo.Enabled = False
|
||||
lstEmpList.Enabled = True
|
||||
lstEmpList.ListIndex = mintBOOKMARK
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
|
||||
mboolADD = False
|
||||
Call EmpLoad
|
||||
cboSort.ListIndex = 0
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
|
||||
On Error GoTo Error_EH
|
||||
' mboolSHOW = True
|
||||
' gintESTID = moRS!EST_id
|
||||
' txtProject = Trim$(Field2Str(moRSProj!proj_id)) & " " & Trim$(moRSProj!proj_code) & " " & moRSProj!proj_desc
|
||||
' chkBill = Field2CheckBox(moRSProj!bill)
|
||||
' chkOption = Field2CheckBox(moRSProj!opt)
|
||||
With moRSEMP
|
||||
txtDept = Field2Str(!PROJ_ID)
|
||||
txtEmpNo = Field2Str(!Proj_Code)
|
||||
txtLName = Field2Str(!Proj_Desc)
|
||||
txtFName = Field2Str(!LaborDesc)
|
||||
txtWCCode = Field2Str(!Rate)
|
||||
' txtSS = Field2Str(!SocialSecurityNumber)
|
||||
' txtStatus = Field2Str(!Terminated)
|
||||
' txtPNTCode = Field2Str(!pnt_code)
|
||||
' txtLCode = Field2Str(!l_code)
|
||||
' txtSCode = Field2Str(!s_code)
|
||||
' txtSTCode = Field2Str(!st_code)
|
||||
End With
|
||||
' mboolSHOW = False
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Billing - Module FormShow"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub lstEmpList_Click()
|
||||
Dim strSQL As String
|
||||
If lstEmpList.ListIndex <> -1 Then
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
' Call OptLoad
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String, intResponse As Integer, strEMPNO As String
|
||||
On Error GoTo Error_EH
|
||||
lstEmpList.col = 0
|
||||
strEMPNO = lstEmpList.ColText
|
||||
|
||||
strSQL = "SELECT * FROM tblCERTIFIED WHERE CertID = " & strEMPNO ' & "'"
|
||||
Set moRSEMP = New Recordset
|
||||
moRSEMP.Open strSQL, goConn, adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSEMP.EOF Then
|
||||
FormFind = False
|
||||
' Call FormClear
|
||||
' Call OptClear
|
||||
Else
|
||||
FormFind = True
|
||||
End If
|
||||
Exit Function
|
||||
|
||||
Error_EH:
|
||||
gstrMODULE = "Form Certified - Module FormFind"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Function
|
||||
End Function
|
||||
|
||||
Private Sub lstEmpList_DblClick()
|
||||
lstEmpList.Enabled = False
|
||||
cmdAdd.Enabled = False
|
||||
cmdSave.Enabled = True
|
||||
txtDept.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub txtDept_GotFocus()
|
||||
Call FieldSelect(txtDept)
|
||||
' txtDept.SelStart = 0
|
||||
|
||||
' If lstCtrl.MaxLength > 0 Then
|
||||
' lstCtrl.SelLength = lstCtrl.MaxLength
|
||||
' Else
|
||||
' txtDept.SelLength = 50
|
||||
' txtDept.SelText
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtDept_LostFocus()
|
||||
txtDept = UCase(txtDept)
|
||||
End Sub
|
||||
|
||||
Private Sub txtEmpNo_GotFocus()
|
||||
Call FieldSelect(txtEmpNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtEmpNo_LostFocus()
|
||||
txtEmpNo = UCase(txtEmpNo)
|
||||
End Sub
|
||||
|
||||
Private Sub txtFName_GotFocus()
|
||||
Call FieldSelect(txtFName)
|
||||
End Sub
|
||||
|
||||
Private Sub txtFName_LostFocus()
|
||||
txtFName = UCase(txtFName)
|
||||
End Sub
|
||||
|
||||
Private Sub txtLName_GotFocus()
|
||||
Call FieldSelect(txtLName)
|
||||
End Sub
|
||||
|
||||
Private Sub txtLName_LostFocus()
|
||||
txtLName = UCase(txtLName)
|
||||
End Sub
|
||||
|
||||
Private Sub txtWCCode_GotFocus()
|
||||
Call FieldSelect(txtWCCode)
|
||||
End Sub
|
||||
|
||||
Private Sub txtWCCode_LostFocus()
|
||||
txtWCCode = UCase(txtWCCode)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cboSort_Click()
|
||||
Dim intMIN As Integer
|
||||
|
||||
On Error Resume Next
|
||||
' mintCnt2 = mintCnt2 + 1
|
||||
' lblCount2 = mintCnt2
|
||||
' mdteBegin = Now
|
||||
' cboSortOrder.ListIndex = cboSort.ListIndex
|
||||
' cboSortOrder.ListIndex = 4
|
||||
|
||||
If cboSort.ListIndex = 0 Then
|
||||
' If mbytSort <> cbolistindex Then
|
||||
If mbytSort = 6 Then
|
||||
' Call InventoryLoad
|
||||
End If
|
||||
lstEmpList.col = 3
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
' lstEmpList.col = 3
|
||||
' lstEmpList.ColSortSeq = -1
|
||||
' lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 2
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 1
|
||||
lstEmpList.ColSortSeq = 0
|
||||
lstEmpList.ColSorted = SortedAscending
|
||||
lstEmpList.Redraw = True
|
||||
lstEmpList.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstEmpList.SearchIgnoreCase = True
|
||||
lstEmpList.ColumnSearch = 1
|
||||
|
||||
txtSearch = ""
|
||||
txtSearch.SetFocus
|
||||
lblSearch.Caption = "Enter Employee Num. Search Info:"
|
||||
ElseIf cboSort.ListIndex = 1 Then
|
||||
If mbytSort = 6 Then
|
||||
' Call InventoryLoad
|
||||
End If
|
||||
lstEmpList.col = 2
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 1
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 3
|
||||
lstEmpList.ColSortSeq = 0
|
||||
lstEmpList.ColSorted = SortedAscending
|
||||
lstEmpList.Redraw = True
|
||||
|
||||
lstEmpList.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstEmpList.SearchIgnoreCase = True
|
||||
' lstEmpList.ColumnSearch = 2
|
||||
lstEmpList.ColumnSearch = 3
|
||||
|
||||
' If chkKEEP Then
|
||||
' Call cmdSearch_Click
|
||||
' txtSearch.SetFocus
|
||||
' Else
|
||||
txtSearch = ""
|
||||
txtSearch.SetFocus
|
||||
' End If
|
||||
' txtSearch = ""
|
||||
lblSearch.Caption = "Enter Last Name Search Information:"
|
||||
' txtSearch.SetFocus
|
||||
ElseIf cboSort.ListIndex = 2 Then
|
||||
If mbytSort = 6 Then
|
||||
' Call InventoryLoad
|
||||
End If
|
||||
lstEmpList.col = 2
|
||||
lstEmpList.ColSortSeq = 0
|
||||
lstEmpList.ColSorted = SortedAscending
|
||||
lstEmpList.col = 1
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 3
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.Redraw = True
|
||||
|
||||
lstEmpList.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstEmpList.SearchIgnoreCase = True
|
||||
lstEmpList.ColumnSearch = 2
|
||||
|
||||
' If chkKEEP Then
|
||||
' Call cmdSearch_Click
|
||||
' txtSearch.SetFocus
|
||||
' Else
|
||||
txtSearch = ""
|
||||
txtSearch.SetFocus
|
||||
' End If
|
||||
lblSearch.Caption = "Enter First Name Search Information:"
|
||||
' txtSearch.SetFocus
|
||||
' End If
|
||||
ElseIf cboSort.ListIndex = 3 Then
|
||||
If mbytSort = 6 Then
|
||||
' Call InventoryLoad
|
||||
End If
|
||||
lstEmpList.col = 0
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 1
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.col = 6
|
||||
lstEmpList.ColSortSeq = 0
|
||||
lstEmpList.ColSorted = SortedAscending
|
||||
lstEmpList.col = 2
|
||||
lstEmpList.ColSortSeq = -1
|
||||
lstEmpList.ColSorted = SortedNone
|
||||
lstEmpList.Redraw = True
|
||||
|
||||
lstEmpList.ColSortDataType = ColSortDataTypeTextNoCase
|
||||
lstEmpList.SearchIgnoreCase = True
|
||||
' lstEmpList.ColumnSearch = 2
|
||||
lstEmpList.ColumnSearch = 6
|
||||
|
||||
' If chkKEEP Then
|
||||
' Call cmdSearch_Click
|
||||
' txtSearch.SetFocus
|
||||
' Else
|
||||
txtSearch = ""
|
||||
txtSearch.SetFocus
|
||||
' End If
|
||||
lblSearch.Caption = "Enter SS Number Search Information:"
|
||||
' txtSearch.SetFocus
|
||||
End If
|
||||
mbytSort = cboSort.ListIndex
|
||||
' mdteEnd = Now
|
||||
' intMIN = DateDiff("s", mdteBegin, mdteEnd)
|
||||
' lblDteBegin = Format(mdteBegin, "HH:MM:SS")
|
||||
' lbldteEnd = Format(mdteEnd, "HH:MM:SS")
|
||||
' lblDiff = intMIN
|
||||
End Sub
|
||||
|
||||
Private Sub txtSearch_Change()
|
||||
'Multiple character search code.
|
||||
lstEmpList.SearchText = txtSearch.Text
|
||||
lstEmpList.SearchMethod = 2
|
||||
lstEmpList.Action = ActionSearch
|
||||
lstEmpList.SearchIndex = -1
|
||||
lstEmpList.Action = 0
|
||||
|
||||
If lstEmpList.SearchIndex <> -1 Then
|
||||
lstEmpList.TopIndex = lstEmpList.SearchIndex
|
||||
lstEmpList.ListIndex = lstEmpList.SearchIndex
|
||||
Else
|
||||
lstEmpList.Action = 6 ' clear
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,139 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmChange
|
||||
Caption = "Change Log"
|
||||
ClientHeight = 2745
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 3990
|
||||
ControlBox = 0 'False
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
MaxButton = 0 'False
|
||||
MinButton = 0 'False
|
||||
ScaleHeight = 2745
|
||||
ScaleWidth = 3990
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.TextBox txtNotes2
|
||||
Height = 285
|
||||
Left = 960
|
||||
TabIndex = 5
|
||||
Top = 975
|
||||
Visible = 0 'False
|
||||
Width = 1545
|
||||
End
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "&Exit"
|
||||
Height = 435
|
||||
Left = 2700
|
||||
TabIndex = 3
|
||||
Top = 600
|
||||
Width = 1095
|
||||
End
|
||||
Begin VB.TextBox txtNotes
|
||||
Height = 1335
|
||||
Left = 120
|
||||
MultiLine = -1 'True
|
||||
TabIndex = 2
|
||||
Top = 1260
|
||||
Width = 3735
|
||||
End
|
||||
Begin VB.Label lblNotes
|
||||
AutoSize = -1 'True
|
||||
Caption = "Notes:"
|
||||
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 = 120
|
||||
TabIndex = 4
|
||||
Top = 960
|
||||
Width = 570
|
||||
End
|
||||
Begin VB.Label lblAction
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 120
|
||||
TabIndex = 1
|
||||
Top = 600
|
||||
Width = 2415
|
||||
End
|
||||
Begin VB.Label lblProjLot
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 3675
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmChange"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Dim strSQL As String
|
||||
Dim oRS As Recordset
|
||||
|
||||
On Error GoTo Error_EH
|
||||
If Len(txtNotes) = 0 Then
|
||||
MsgBox "You Must Enter A Reason In The Notes", vbOKOnly, "Enter Reason"
|
||||
txtNotes.SetFocus
|
||||
Exit Sub
|
||||
End If
|
||||
strSQL = "SELECT * FROM tblLotChange WHERE lot_id = 1"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
oRS.AddNew
|
||||
oRS!reason = Field2Str(txtNotes) & " - " & Field2Str(txtNotes2)
|
||||
oRS!User = gstrLOGIN
|
||||
oRS!Lot_ID = gintLOTID
|
||||
oRS!Action = Left(Field2Str(lblAction), 20)
|
||||
oRS.Update
|
||||
Unload Me
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler(oRS.ActiveConnection)
|
||||
Exit Sub
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtNotes_GotFocus()
|
||||
Call FieldSelect(txtNotes)
|
||||
End Sub
|
||||
|
||||
Private Sub txtNotes_LostFocus()
|
||||
txtNotes.Text = UCase(txtNotes.Text)
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
' Call ProjLoad
|
||||
|
||||
' lblProjLot = moRSProj!proj_code & " " & moRSProj!proj_desc
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler2
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -0,0 +1,999 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmContractor
|
||||
Caption = "Contractor Information"
|
||||
ClientHeight = 5070
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 10845
|
||||
KeyPreview = -1 'True
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5070
|
||||
ScaleWidth = 10845
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CheckBox chkShowAll
|
||||
Caption = "Show All Contractors"
|
||||
Height = 495
|
||||
Left = 9345
|
||||
TabIndex = 40
|
||||
Top = 3585
|
||||
Width = 1455
|
||||
End
|
||||
Begin VB.CheckBox chkINACTIVE
|
||||
Caption = "InActive Contractor"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 8.25
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 330
|
||||
Left = 7305
|
||||
TabIndex = 39
|
||||
Top = 3690
|
||||
Width = 2055
|
||||
End
|
||||
Begin VB.TextBox txtBillPhone
|
||||
Alignment = 1 'Right Justify
|
||||
Height = 315
|
||||
Left = 8880
|
||||
TabIndex = 17
|
||||
Top = 4080
|
||||
Width = 1875
|
||||
End
|
||||
Begin VB.TextBox txtBillContact
|
||||
Height = 315
|
||||
Left = 6180
|
||||
TabIndex = 16
|
||||
Top = 4080
|
||||
Width = 2715
|
||||
End
|
||||
Begin VB.TextBox txtPager
|
||||
Alignment = 1 'Right Justify
|
||||
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 = 6180
|
||||
MaxLength = 10
|
||||
TabIndex = 14
|
||||
Top = 3360
|
||||
Width = 1635
|
||||
End
|
||||
Begin VB.TextBox txtFAX
|
||||
Alignment = 1 'Right Justify
|
||||
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 = 6180
|
||||
MaxLength = 10
|
||||
TabIndex = 12
|
||||
Top = 2640
|
||||
Width = 1635
|
||||
End
|
||||
Begin VB.TextBox txtPhone
|
||||
Alignment = 1 'Right Justify
|
||||
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 = 6180
|
||||
MaxLength = 10
|
||||
TabIndex = 11
|
||||
Top = 2280
|
||||
Width = 1635
|
||||
End
|
||||
Begin VB.TextBox txtZip
|
||||
Alignment = 1 'Right Justify
|
||||
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 = 9480
|
||||
TabIndex = 10
|
||||
Top = 1920
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.TextBox txtMAS90AR
|
||||
Height = 315
|
||||
Left = 6180
|
||||
MaxLength = 7
|
||||
TabIndex = 15
|
||||
Top = 3720
|
||||
Width = 1080
|
||||
End
|
||||
Begin VB.TextBox txtCell
|
||||
Alignment = 1 'Right Justify
|
||||
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 = 6180
|
||||
MaxLength = 10
|
||||
TabIndex = 13
|
||||
Top = 3000
|
||||
Width = 1635
|
||||
End
|
||||
Begin VB.TextBox txtState
|
||||
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 = 8940
|
||||
TabIndex = 9
|
||||
Top = 1920
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.TextBox txtCity
|
||||
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 = 6180
|
||||
TabIndex = 8
|
||||
Top = 1920
|
||||
Width = 2715
|
||||
End
|
||||
Begin VB.TextBox txtAddress2
|
||||
Height = 315
|
||||
Left = 6180
|
||||
MaxLength = 30
|
||||
TabIndex = 7
|
||||
Top = 1560
|
||||
Width = 4575
|
||||
End
|
||||
Begin VB.TextBox txtConSuper
|
||||
Height = 315
|
||||
Left = 6180
|
||||
MaxLength = 20
|
||||
TabIndex = 5
|
||||
Top = 840
|
||||
Width = 2715
|
||||
End
|
||||
Begin VB.TextBox txtAddress1
|
||||
Height = 315
|
||||
Left = 6180
|
||||
MaxLength = 30
|
||||
TabIndex = 6
|
||||
Top = 1200
|
||||
Width = 4575
|
||||
End
|
||||
Begin VB.TextBox txtName
|
||||
Height = 315
|
||||
Left = 6180
|
||||
MaxLength = 30
|
||||
TabIndex = 4
|
||||
Top = 480
|
||||
Width = 4575
|
||||
End
|
||||
Begin VB.ListBox lstContractor
|
||||
Height = 4935
|
||||
Left = 300
|
||||
Sorted = -1 'True
|
||||
TabIndex = 1
|
||||
Top = 60
|
||||
Width = 4275
|
||||
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 = 9180
|
||||
TabIndex = 3
|
||||
TabStop = 0 'False
|
||||
Top = 4440
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
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 = 4680
|
||||
TabIndex = 2
|
||||
TabStop = 0 'False
|
||||
Top = 4440
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
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 = 7680
|
||||
TabIndex = 0
|
||||
TabStop = 0 'False
|
||||
Top = 4440
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
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 = 6180
|
||||
TabIndex = 18
|
||||
Top = 4440
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.Label lblBilling
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Billing Contact/Ph:"
|
||||
Height = 195
|
||||
Left = 4785
|
||||
TabIndex = 38
|
||||
Top = 4140
|
||||
Width = 1320
|
||||
End
|
||||
Begin VB.Label lblLast
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 8640
|
||||
TabIndex = 37
|
||||
Top = 120
|
||||
Width = 2115
|
||||
End
|
||||
Begin VB.Label lblPCount
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 7920
|
||||
TabIndex = 36
|
||||
Top = 120
|
||||
Width = 675
|
||||
End
|
||||
Begin VB.Label lblProject
|
||||
AutoSize = -1 'True
|
||||
Caption = "Project Count:"
|
||||
Height = 195
|
||||
Left = 6900
|
||||
TabIndex = 35
|
||||
Top = 180
|
||||
Width = 1005
|
||||
End
|
||||
Begin VB.Label lblUDate
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 7980
|
||||
TabIndex = 34
|
||||
Top = 3240
|
||||
Width = 2775
|
||||
End
|
||||
Begin VB.Label lblCDate
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 315
|
||||
Left = 7980
|
||||
TabIndex = 33
|
||||
Top = 2580
|
||||
Width = 2775
|
||||
End
|
||||
Begin VB.Label lblUpdate
|
||||
AutoSize = -1 'True
|
||||
Caption = "Last 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 = 7980
|
||||
TabIndex = 32
|
||||
Top = 3000
|
||||
Width = 1215
|
||||
End
|
||||
Begin VB.Label lblCreated
|
||||
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 = 7980
|
||||
TabIndex = 31
|
||||
Top = 2340
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.Label lblConId
|
||||
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 = 6180
|
||||
TabIndex = 30
|
||||
Top = 120
|
||||
Width = 675
|
||||
End
|
||||
Begin VB.Label lblPager
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Pager:"
|
||||
Height = 195
|
||||
Left = 5640
|
||||
TabIndex = 29
|
||||
Top = 3420
|
||||
Width = 465
|
||||
End
|
||||
Begin VB.Label lblFax
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "FAX #:"
|
||||
Height = 195
|
||||
Left = 5610
|
||||
TabIndex = 28
|
||||
Top = 2700
|
||||
Width = 495
|
||||
End
|
||||
Begin VB.Label lblPhone
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Telephone:"
|
||||
Height = 195
|
||||
Left = 5295
|
||||
TabIndex = 27
|
||||
Top = 2340
|
||||
Width = 810
|
||||
End
|
||||
Begin VB.Label lblMAS90AR
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "CMS AR Code:"
|
||||
Height = 195
|
||||
Left = 5025
|
||||
TabIndex = 26
|
||||
Top = 3780
|
||||
Width = 1080
|
||||
End
|
||||
Begin VB.Label lblCell
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Cell #:"
|
||||
Height = 195
|
||||
Left = 5655
|
||||
TabIndex = 25
|
||||
Top = 3060
|
||||
Width = 450
|
||||
End
|
||||
Begin VB.Label lblCSZ
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "City/State/Zip:"
|
||||
Height = 195
|
||||
Left = 5055
|
||||
TabIndex = 24
|
||||
Top = 1980
|
||||
Width = 1050
|
||||
End
|
||||
Begin VB.Label lblAdd2
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address 2:"
|
||||
Height = 195
|
||||
Left = 5355
|
||||
TabIndex = 23
|
||||
Top = 1620
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblConSuper
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Purchasing Contact:"
|
||||
Height = 195
|
||||
Left = 4665
|
||||
TabIndex = 22
|
||||
Top = 900
|
||||
Width = 1440
|
||||
End
|
||||
Begin VB.Label lblAdd1
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address 1:"
|
||||
Height = 195
|
||||
Left = 5355
|
||||
TabIndex = 21
|
||||
Top = 1260
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblCode
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Contractor #:"
|
||||
Height = 195
|
||||
Left = 5175
|
||||
TabIndex = 20
|
||||
Top = 180
|
||||
Width = 930
|
||||
End
|
||||
Begin VB.Label lblDesc
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Contractor Name:"
|
||||
Height = 195
|
||||
Left = 4860
|
||||
TabIndex = 19
|
||||
Top = 540
|
||||
Width = 1245
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmContractor"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRSCont As Recordset
|
||||
|
||||
Dim mboolSHOW As Boolean
|
||||
Dim mboolAdding As Boolean
|
||||
Dim mboolDelete As Boolean
|
||||
Dim mintCONTID As Integer
|
||||
|
||||
Private Sub chkShowAll_Click()
|
||||
Call ContractorLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
cmdAdd.Enabled = False
|
||||
' cmdDelete.Enabled = False
|
||||
cmdExit.Enabled = False
|
||||
' cmdFindCont.Visible = True
|
||||
mboolAdding = True
|
||||
lstContractor.Enabled = False
|
||||
Call FormClear
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
mboolDelete = False
|
||||
Call CheckLots
|
||||
If mboolDelete = True Then
|
||||
moRSCont.Delete
|
||||
End If
|
||||
Call ContractorLoad
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
lstContractor.Enabled = True
|
||||
' cmdDelete.Enabled = True
|
||||
cmdSave.Enabled = False
|
||||
cmdAdd.Enabled = True
|
||||
cmdExit.Enabled = True
|
||||
Call FormSave
|
||||
lstContractor.SetFocus
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Dim lngContId As Long
|
||||
Call ContractorLoad
|
||||
|
||||
If Not gbytSECURITY > 3 Then
|
||||
' cmdDelete.Enabled = True
|
||||
End If
|
||||
If gintPAYID > 0 Then 'See if this form was called from the project notes form
|
||||
lngContId = CLng(gintPAYID)
|
||||
Call ListFindItem(lstContractor, lngContId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ContractorLoad()
|
||||
Dim oRS As Recordset, lngBOOKMARK As Long
|
||||
Dim strSQL As String
|
||||
Dim strLine As String
|
||||
|
||||
lngBOOKMARK = 0
|
||||
|
||||
If chkShowAll Then
|
||||
strSQL = "SELECT Cont_id, contrcr from tblConInfo"
|
||||
Else
|
||||
strSQL = "SELECT Cont_id, contrcr from tblConInfo WHERE NOT INACTIVE"
|
||||
End If
|
||||
' strSQL = "SELECT Cont_id, contrcr from tblConInfo"
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
' lngBOOKMARK = lstContractor.ListIndex
|
||||
lstContractor.Clear
|
||||
|
||||
Do Until oRS.EOF
|
||||
With lstContractor
|
||||
.AddItem oRS!contrcr
|
||||
.ItemData(.NewIndex) = oRS!cont_id
|
||||
End With
|
||||
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
|
||||
If lstContractor.ListCount Then
|
||||
lstContractor.ListIndex = lngBOOKMARK
|
||||
Else
|
||||
lstContractor.ListIndex = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FormSave()
|
||||
Dim intBOOKMARK As Integer
|
||||
|
||||
On Error GoTo Error_EH
|
||||
|
||||
If mboolAdding Then
|
||||
moRSCont.AddNew
|
||||
moRSCont!C_USER = gstrLOGIN
|
||||
Else
|
||||
intBOOKMARK = lstContractor.ListIndex
|
||||
End If
|
||||
|
||||
Call FieldsSave
|
||||
|
||||
moRSCont.Update
|
||||
|
||||
|
||||
If mboolAdding Then
|
||||
mboolAdding = False
|
||||
intBOOKMARK = 0
|
||||
End If
|
||||
|
||||
Call ContractorLoad
|
||||
|
||||
lstContractor.ListIndex = intBOOKMARK
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
Call ErrorHandler(moRSCont.ActiveConnection)
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub FormClear()
|
||||
txtNAME = ""
|
||||
txtConSuper = ""
|
||||
txtAddress1 = ""
|
||||
txtAddress2 = ""
|
||||
txtCity = ""
|
||||
txtSTATE = ""
|
||||
txtZIP = ""
|
||||
txtPhone = ""
|
||||
txtFAX = ""
|
||||
txtCell = ""
|
||||
txtPager = ""
|
||||
lblConId = ""
|
||||
txtMAS90AR = ""
|
||||
txtBillContact = ""
|
||||
txtBillPhone = ""
|
||||
chkINACTIVE = vbUnchecked
|
||||
End Sub
|
||||
|
||||
Private Function FormFind() As Boolean
|
||||
Dim strSQL As String, strPlan As String
|
||||
|
||||
strSQL = "SELECT * "
|
||||
strSQL = strSQL & "FROM tblConInfo "
|
||||
strSQL = strSQL & "WHERE Cont_id = " & mintCONTID
|
||||
|
||||
Set moRSCont = New Recordset
|
||||
|
||||
If moRSCont.State = adStateOpen Then
|
||||
moRSCont.Close
|
||||
End If
|
||||
|
||||
moRSCont.Open strSQL, goConn, _
|
||||
adOpenKeyset, adLockPessimistic
|
||||
|
||||
If moRSCont.EOF Then
|
||||
FormFind = False
|
||||
Else
|
||||
FormFind = True
|
||||
End If
|
||||
End Function
|
||||
Private Sub FieldsSave()
|
||||
On Error GoTo Error_EH
|
||||
|
||||
With moRSCont
|
||||
!contrcr = Str2Field(txtNAME)
|
||||
!contact = Str2Field(txtConSuper)
|
||||
!add1 = Str2Field(txtAddress1)
|
||||
!add2 = Str2Field(txtAddress2)
|
||||
!City = Str2Field(txtCity)
|
||||
!State = Str2Field(txtSTATE)
|
||||
!zip = Str2Field(txtZIP)
|
||||
!phone = Str2Field(txtPhone)
|
||||
!fax = Str2Field(txtFAX)
|
||||
!cell = Str2Field(txtCell)
|
||||
!pager = Str2Field(txtPager)
|
||||
!ar = Str2Field(txtMAS90AR)
|
||||
!billing = Str2Field(txtBillContact)
|
||||
!bill_ph = Str2Field(txtBillPhone)
|
||||
!inactive = Field2CheckBox(chkINACTIVE)
|
||||
!Update = Now()
|
||||
!U_USER = gstrLOGIN
|
||||
End With
|
||||
|
||||
moRSCont.Update
|
||||
Exit Sub
|
||||
Error_EH:
|
||||
gstrMODULE = " Form Contractor - Module FieldsSave"
|
||||
Call ErrorHandler2
|
||||
gstrMODULE = ""
|
||||
Exit Sub
|
||||
End Sub
|
||||
|
||||
Private Sub lstContractor_Click()
|
||||
If lstContractor.ListIndex <> -1 Then
|
||||
mintCONTID = lstContractor.ItemData(lstContractor.ListIndex)
|
||||
If FormFind() Then
|
||||
Call FormShow
|
||||
' Call MatLoad
|
||||
' Call OptLoad
|
||||
' Call OptMatLoad
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FormShow()
|
||||
Dim oRS As Recordset, strSQL As String, intPCount As Integer
|
||||
|
||||
mboolSHOW = True
|
||||
mintCONTID = moRSCont!cont_id
|
||||
|
||||
strSQL = "SELECT Proj_id, Cont_id, Create FROM tblProject WHERE cont_id = " & mintCONTID & " ORDER BY Create DESC"
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
intPCount = oRS.RecordCount
|
||||
|
||||
With moRSCont
|
||||
txtNAME = Field2Str(!contrcr)
|
||||
txtConSuper = Field2Str(!contact)
|
||||
txtAddress1 = Field2Str(!add1)
|
||||
txtAddress2 = Field2Str(!add2)
|
||||
txtCity = Field2Str(!City)
|
||||
txtSTATE = Field2Str(!State)
|
||||
txtZIP = Field2Str(!zip)
|
||||
txtPhone = Field2Str(!phone)
|
||||
txtFAX = Field2Str(!fax)
|
||||
txtCell = Field2Str(!cell)
|
||||
txtPager = Field2Str(!pager)
|
||||
lblConId = Field2Str2(!cont_id)
|
||||
txtMAS90AR = Field2Str(!ar)
|
||||
txtBillContact = Field2Str(!billing)
|
||||
txtBillPhone = Field2Str2(!bill_ph)
|
||||
lblCDate = Field2Str(!Create)
|
||||
lblCDate = lblCDate & " - " & Field2Str(!C_USER)
|
||||
lblUDate = Field2Str(!Update)
|
||||
lblUDate = lblUDate & " - " & Field2Str(!U_USER)
|
||||
lblPCount = intPCount
|
||||
chkINACTIVE = Field2CheckBox(!inactive)
|
||||
If intPCount > 0 Then
|
||||
lblLast = oRS!Create
|
||||
End If
|
||||
End With
|
||||
|
||||
mboolSHOW = False
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyPress(KeyAscii As Integer)
|
||||
If KeyAscii = 13 Then
|
||||
SendKeys "{TAB}"
|
||||
KeyAscii = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
||||
|
||||
If Shift = 4 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not cmdSave.Enabled Then
|
||||
cmdSave.Enabled = True
|
||||
cmdAdd.Enabled = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub lstContractor_DblClick()
|
||||
cmdSave.Enabled = True
|
||||
cmdAdd.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub txtBillContact_GotFocus()
|
||||
Call FieldSelect(txtBillContact)
|
||||
End Sub
|
||||
|
||||
Private Sub txtBillContact_LostFocus()
|
||||
txtBillContact = UCase(txtBillContact)
|
||||
End Sub
|
||||
|
||||
Private Sub txtBillPhone_GotFocus()
|
||||
Call FieldSelect(txtBillPhone)
|
||||
End Sub
|
||||
|
||||
Private Sub txtConSuper_GotFocus()
|
||||
Call FieldSelect(txtConSuper)
|
||||
End Sub
|
||||
|
||||
Private Sub txtConSuper_LostFocus()
|
||||
txtConSuper = UCase(txtConSuper)
|
||||
End Sub
|
||||
|
||||
Private Sub txtNAME_GotFocus()
|
||||
Call FieldSelect(txtNAME)
|
||||
End Sub
|
||||
|
||||
Private Sub txtNAME_LostFocus()
|
||||
txtNAME = UCase(txtNAME)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress1_GotFocus()
|
||||
Call FieldSelect(txtAddress1)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress1_LostFocus()
|
||||
txtAddress1 = UCase(txtAddress1)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress2_GotFocus()
|
||||
Call FieldSelect(txtAddress2)
|
||||
End Sub
|
||||
|
||||
Private Sub txtAddress2_LostFocus()
|
||||
txtAddress2 = UCase(txtAddress2)
|
||||
End Sub
|
||||
|
||||
Private Sub txtMAS90AR_GotFocus()
|
||||
Call FieldSelect(txtMAS90AR)
|
||||
End Sub
|
||||
|
||||
Private Sub txtMAS90AR_LostFocus()
|
||||
txtMAS90AR = UCase(txtMAS90AR)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCity_GotFocus()
|
||||
Call FieldSelect(txtCity)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCity_LostFocus()
|
||||
txtCity = UCase(txtCity)
|
||||
End Sub
|
||||
|
||||
Private Sub txtState_GotFocus()
|
||||
Call FieldSelect(txtSTATE)
|
||||
End Sub
|
||||
|
||||
Private Sub txtState_LostFocus()
|
||||
txtSTATE = UCase(txtSTATE)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCell_GotFocus()
|
||||
Call FieldSelect(txtCell)
|
||||
End Sub
|
||||
|
||||
Private Sub txtCell_LostFocus()
|
||||
txtCell = UCase(txtCell)
|
||||
End Sub
|
||||
|
||||
Private Sub txtZip_GotFocus()
|
||||
Call FieldSelect(txtZIP)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPager_GotFocus()
|
||||
Call FieldSelect(txtPager)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPager_LostFocus()
|
||||
txtPager = UCase(txtPager)
|
||||
End Sub
|
||||
|
||||
Private Sub txtFAX_GotFocus()
|
||||
Call FieldSelect(txtFAX)
|
||||
End Sub
|
||||
|
||||
Private Sub txtFAX_LostFocus()
|
||||
txtFAX = UCase(txtFAX)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPhone_GotFocus()
|
||||
Call FieldSelect(txtPhone)
|
||||
End Sub
|
||||
|
||||
Private Sub txtPhone_LostFocus()
|
||||
' If Len(txtPhone) > 0 Then
|
||||
' txtPhone = Format(txtPhone, "### ### ####")
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
Private Sub CheckLots()
|
||||
Dim oRS As Recordset, oRSS As Recordset, oRSSS As Recordset
|
||||
Dim oRSC As Recordset, strSql2 As String
|
||||
Dim strSQL As String, intResponse As Integer, strMSG As String
|
||||
Dim strSELECT As String, strGET As String, intID As Integer
|
||||
|
||||
strSql2 = "SELECT Proj_id, Cont_id, Proj_desc FROM tblProject WHERE cont_id = " & mintCONTID
|
||||
Set oRSC = New Recordset
|
||||
oRSC.Open strSql2, goConn, adOpenKeyset, adLockReadOnly
|
||||
|
||||
Do Until oRSC.EOF
|
||||
gintPROJID = oRSC!PROJ_ID
|
||||
strSQL = "SELECT Lot_no FROM tblLotInfo where proj_id = " & gintPROJID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockReadOnly
|
||||
|
||||
If oRS.RecordCount > 0 Then
|
||||
strMSG = "There have been Lots processed for this Subdivision."
|
||||
strMSG = strMSG & vbCrLf & "You cannot delete this Project"
|
||||
intResponse = MsgBox(strMSG, vbCritical & vbOKOnly, "Delete Error")
|
||||
Exit Sub
|
||||
End If
|
||||
oRS.Close
|
||||
|
||||
strSQL = "SELECT est_id FROM tblplans where proj_id = " & gintPROJID
|
||||
|
||||
Set oRS = New Recordset
|
||||
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
If oRS.RecordCount > 0 Then
|
||||
strMSG = "There are Plans in the database for this subdivision - " & oRSC!Proj_Desc
|
||||
strMSG = strMSG & vbCrLf & "Do you want to Delete These Plans Also?"
|
||||
intResponse = MsgBox(strMSG, vbQuestion & vbYesNo, "Project Plans Delete Error")
|
||||
If intResponse = vbYes Then
|
||||
Do Until oRS.EOF
|
||||
intID = oRS!est_id
|
||||
strGET = "SELECT optid FROM tblPOptions where estid = " & intID
|
||||
Set oRSS = New Recordset
|
||||
oRSS.Open strGET, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
If oRSS.RecordCount > 0 Then
|
||||
Do Until oRSS.EOF
|
||||
strGET = "DELETE * FROM tblPOMatrl where optid = " & oRSS!OPTID
|
||||
goConn.Execute strGET
|
||||
oRSS.MoveNext
|
||||
Loop
|
||||
End If
|
||||
strGET = "DELETE * FROM tblPOptions where est_id = " & intID
|
||||
goConn.Execute strGET
|
||||
strGET = "DELETE * FROM tblplanmat where est_id = " & intID
|
||||
goConn.Execute strGET
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
strGET = "DELETE * FROM tblPlans where proj_id = " & gintPROJID
|
||||
goConn.Execute strGET
|
||||
ElseIf intResponse = vbNo Then
|
||||
oRS.Close
|
||||
' Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
strSQL = "SELECT toid FROM tbltake where proj_id = " & gintPROJID
|
||||
Set oRS = New Recordset
|
||||
oRS.Open strSQL, goConn, adOpenForwardOnly, adLockOptimistic
|
||||
|
||||
If oRS.RecordCount > 0 Then
|
||||
strMSG = "There are Takeoffs in the database for this subdivision - " & oRSC!Proj_Desc
|
||||
strMSG = strMSG & vbCrLf & "Do you want to Delete These Takeoffs Also?"
|
||||
intResponse = MsgBox(strMSG, vbQuestion & vbYesNo, "Project Takeoff Delete Error")
|
||||
If intResponse = vbYes Then
|
||||
Do Until oRS.EOF
|
||||
intID = oRS!toid
|
||||
strGET = "DELETE * FROM tbloption WHERE toid = " & intID
|
||||
goConn.Execute strGET
|
||||
strGET = "DELETE * FROM tblOptMatrl where toid = " & intID
|
||||
goConn.Execute strGET
|
||||
strGET = "DELETE * FROM tblMeasure where toid = " & intID
|
||||
goConn.Execute strGET
|
||||
strGET = "DELETE * FROM tblTOMatrl where toid = " & intID
|
||||
goConn.Execute strGET
|
||||
oRS.MoveNext
|
||||
Loop
|
||||
oRS.Close
|
||||
strGET = "DELETE * FROM tblTake where proj_id = " & gintPROJID
|
||||
goConn.Execute strGET
|
||||
ElseIf intResponse = vbNo Then
|
||||
oRS.Close
|
||||
' Exit Sub
|
||||
End If
|
||||
End If
|
||||
oRSC.MoveNext
|
||||
Loop
|
||||
mboolDelete = True
|
||||
End Sub
|
||||
@@ -0,0 +1,457 @@
|
||||
VERSION 5.00
|
||||
Object = "{DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0"; "TODG7.OCX"
|
||||
Begin VB.Form frmContractor2
|
||||
Caption = "Contractor Information"
|
||||
ClientHeight = 6240
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 11880
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 6240
|
||||
ScaleWidth = 11880
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "Exit"
|
||||
Height = 555
|
||||
Left = 10380
|
||||
TabIndex = 8
|
||||
Top = 5640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
Height = 555
|
||||
Left = 6940
|
||||
TabIndex = 7
|
||||
Top = 5640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
Height = 555
|
||||
Left = 3500
|
||||
TabIndex = 6
|
||||
Top = 5640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
Height = 555
|
||||
Left = 60
|
||||
TabIndex = 5
|
||||
Top = 5640
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Height = 300
|
||||
Left = 5220
|
||||
Picture = "frmContractor2.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 4
|
||||
Top = 5760
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Height = 300
|
||||
Left = 5580
|
||||
Picture = "frmContractor2.frx":0342
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 3
|
||||
Top = 5760
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Height = 300
|
||||
Left = 5925
|
||||
Picture = "frmContractor2.frx":0684
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 2
|
||||
Top = 5760
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdLast
|
||||
Height = 300
|
||||
Left = 6285
|
||||
Picture = "frmContractor2.frx":09C6
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 1
|
||||
Top = 5760
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin TrueOleDBGrid70.TDBGrid TDBGLabor
|
||||
Height = 5535
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 60
|
||||
Width = 11700
|
||||
_ExtentX = 20638
|
||||
_ExtentY = 9763
|
||||
_LayoutType = 4
|
||||
_RowHeight = -2147483647
|
||||
_WasPersistedAsPixels= 0
|
||||
Columns(0)._VlistStyle= 0
|
||||
Columns(0)._MaxComboItems= 5
|
||||
Columns(0).Caption= "Contractor"
|
||||
Columns(0).DataField= "contrcr"
|
||||
Columns(0).DataWidth= 30
|
||||
Columns(0)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(1)._VlistStyle= 0
|
||||
Columns(1)._MaxComboItems= 5
|
||||
Columns(1).Caption= "Contact Person"
|
||||
Columns(1).DataField= "contact"
|
||||
Columns(1).DataWidth= 20
|
||||
Columns(1)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(2)._VlistStyle= 0
|
||||
Columns(2)._MaxComboItems= 5
|
||||
Columns(2).Caption= "Address 1"
|
||||
Columns(2).DataField= "add1"
|
||||
Columns(2).DataWidth= 20
|
||||
Columns(2)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(3)._VlistStyle= 0
|
||||
Columns(3)._MaxComboItems= 5
|
||||
Columns(3).Caption= "Address2"
|
||||
Columns(3).DataField= "add2"
|
||||
Columns(3).DataWidth= 20
|
||||
Columns(3)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(4)._VlistStyle= 0
|
||||
Columns(4)._MaxComboItems= 5
|
||||
Columns(4).Caption= "City"
|
||||
Columns(4).DataField= "city"
|
||||
Columns(4).DataWidth= 20
|
||||
Columns(4)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(5)._VlistStyle= 0
|
||||
Columns(5)._MaxComboItems= 5
|
||||
Columns(5).Caption= "State"
|
||||
Columns(5).DataField= "state"
|
||||
Columns(5).DataWidth= 2
|
||||
Columns(5)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(6)._VlistStyle= 0
|
||||
Columns(6)._MaxComboItems= 5
|
||||
Columns(6).Caption= "Zip"
|
||||
Columns(6).DataField= "zip"
|
||||
Columns(6).DataWidth= 5
|
||||
Columns(6)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(7)._VlistStyle= 0
|
||||
Columns(7)._MaxComboItems= 5
|
||||
Columns(7).Caption= "Office Phone"
|
||||
Columns(7).DataField= "phone"
|
||||
Columns(7).DataWidth= 13
|
||||
Columns(7).EditMask= "(###) ###-###"
|
||||
Columns(7)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(8)._VlistStyle= 0
|
||||
Columns(8)._MaxComboItems= 5
|
||||
Columns(8).Caption= "FAX"
|
||||
Columns(8).DataField= "fax"
|
||||
Columns(8).DataWidth= 13
|
||||
Columns(8).EditMask= "(###) ###-####"
|
||||
Columns(8)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(9)._VlistStyle= 0
|
||||
Columns(9)._MaxComboItems= 5
|
||||
Columns(9).Caption= "Cell"
|
||||
Columns(9).DataField= "cell"
|
||||
Columns(9).DataWidth= 13
|
||||
Columns(9).EditMask= "(###) ###-###"
|
||||
Columns(9)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(10)._VlistStyle= 0
|
||||
Columns(10)._MaxComboItems= 5
|
||||
Columns(10).Caption= "Pager"
|
||||
Columns(10).DataField= "pager"
|
||||
Columns(10).DataWidth= 13
|
||||
Columns(10).EditMask= "(###) ###-###"
|
||||
Columns(10)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(11)._VlistStyle= 0
|
||||
Columns(11)._MaxComboItems= 5
|
||||
Columns(11).Caption= "MAS90"
|
||||
Columns(11).DataField= "ar"
|
||||
Columns(11).DataWidth= 15
|
||||
Columns(11)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns.Count = 12
|
||||
Splits(0)._UserFlags= 0
|
||||
Splits(0).RecordSelectorWidth= 503
|
||||
Splits(0)._SavedRecordSelectors= 0 'False
|
||||
Splits(0).DividerColor= 12632256
|
||||
Splits(0).SpringMode= 0 'False
|
||||
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
|
||||
Splits(0)._ColumnProps(0)= "Columns.Count=12"
|
||||
Splits(0)._ColumnProps(1)= "Column(0).Width=5054"
|
||||
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
|
||||
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=4974"
|
||||
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
|
||||
Splits(0)._ColumnProps(5)= "Column(1).Width=4445"
|
||||
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
|
||||
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=4366"
|
||||
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
|
||||
Splits(0)._ColumnProps(9)= "Column(2).Width=5054"
|
||||
Splits(0)._ColumnProps(10)= "Column(2).DividerColor=0"
|
||||
Splits(0)._ColumnProps(11)= "Column(2)._WidthInPix=4974"
|
||||
Splits(0)._ColumnProps(12)= "Column(2).Order=3"
|
||||
Splits(0)._ColumnProps(13)= "Column(3).Width=5424"
|
||||
Splits(0)._ColumnProps(14)= "Column(3).DividerColor=0"
|
||||
Splits(0)._ColumnProps(15)= "Column(3)._WidthInPix=5345"
|
||||
Splits(0)._ColumnProps(16)= "Column(3).Order=4"
|
||||
Splits(0)._ColumnProps(17)= "Column(4).Width=2725"
|
||||
Splits(0)._ColumnProps(18)= "Column(4).DividerColor=0"
|
||||
Splits(0)._ColumnProps(19)= "Column(4)._WidthInPix=2646"
|
||||
Splits(0)._ColumnProps(20)= "Column(4).Order=5"
|
||||
Splits(0)._ColumnProps(21)= "Column(5).Width=873"
|
||||
Splits(0)._ColumnProps(22)= "Column(5).DividerColor=0"
|
||||
Splits(0)._ColumnProps(23)= "Column(5)._WidthInPix=794"
|
||||
Splits(0)._ColumnProps(24)= "Column(5).Order=6"
|
||||
Splits(0)._ColumnProps(25)= "Column(6).Width=1270"
|
||||
Splits(0)._ColumnProps(26)= "Column(6).DividerColor=0"
|
||||
Splits(0)._ColumnProps(27)= "Column(6)._WidthInPix=1191"
|
||||
Splits(0)._ColumnProps(28)= "Column(6).Order=7"
|
||||
Splits(0)._ColumnProps(29)= "Column(7).Width=1931"
|
||||
Splits(0)._ColumnProps(30)= "Column(7).DividerColor=0"
|
||||
Splits(0)._ColumnProps(31)= "Column(7)._WidthInPix=1852"
|
||||
Splits(0)._ColumnProps(32)= "Column(7).Order=8"
|
||||
Splits(0)._ColumnProps(33)= "Column(8).Width=1799"
|
||||
Splits(0)._ColumnProps(34)= "Column(8).DividerColor=0"
|
||||
Splits(0)._ColumnProps(35)= "Column(8)._WidthInPix=1720"
|
||||
Splits(0)._ColumnProps(36)= "Column(8).Order=9"
|
||||
Splits(0)._ColumnProps(37)= "Column(9).Width=1931"
|
||||
Splits(0)._ColumnProps(38)= "Column(9).DividerColor=0"
|
||||
Splits(0)._ColumnProps(39)= "Column(9)._WidthInPix=1852"
|
||||
Splits(0)._ColumnProps(40)= "Column(9).Order=10"
|
||||
Splits(0)._ColumnProps(41)= "Column(10).Width=1931"
|
||||
Splits(0)._ColumnProps(42)= "Column(10).DividerColor=0"
|
||||
Splits(0)._ColumnProps(43)= "Column(10)._WidthInPix=1852"
|
||||
Splits(0)._ColumnProps(44)= "Column(10).Order=11"
|
||||
Splits(0)._ColumnProps(45)= "Column(11).Width=1667"
|
||||
Splits(0)._ColumnProps(46)= "Column(11).DividerColor=0"
|
||||
Splits(0)._ColumnProps(47)= "Column(11)._WidthInPix=1588"
|
||||
Splits(0)._ColumnProps(48)= "Column(11).Order=12"
|
||||
Splits.Count = 1
|
||||
PrintInfos(0)._StateFlags= 0
|
||||
PrintInfos(0).Name= "piInternal 0"
|
||||
PrintInfos(0).PageHeaderFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageFooterFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageHeaderHeight= 0
|
||||
PrintInfos(0).PageFooterHeight= 0
|
||||
PrintInfos.Count= 1
|
||||
AllowDelete = -1 'True
|
||||
AllowAddNew = -1 'True
|
||||
DefColWidth = 0
|
||||
HeadLines = 1
|
||||
FootLines = 1
|
||||
MultipleLines = 0
|
||||
CellTipsWidth = 0
|
||||
DeadAreaBackColor= 12632256
|
||||
RowDividerColor = 12632256
|
||||
RowSubDividerColor= 12632256
|
||||
DirectionAfterEnter= 1
|
||||
MaxRows = 250000
|
||||
ViewColumnCaptionWidth= 0
|
||||
ViewColumnWidth = 0
|
||||
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
|
||||
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
|
||||
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
|
||||
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
|
||||
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=825,.italic=0"
|
||||
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(5) = ":id=0,.fontname=MS Sans Serif"
|
||||
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
|
||||
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
|
||||
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34"
|
||||
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
|
||||
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
|
||||
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
|
||||
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
|
||||
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
|
||||
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
|
||||
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
|
||||
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
|
||||
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
|
||||
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
|
||||
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
|
||||
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
|
||||
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
|
||||
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
|
||||
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
|
||||
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
|
||||
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
|
||||
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
|
||||
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
|
||||
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
|
||||
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=28,.parent=13"
|
||||
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=25,.parent=14"
|
||||
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=26,.parent=15"
|
||||
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=27,.parent=17"
|
||||
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=32,.parent=13"
|
||||
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=29,.parent=14"
|
||||
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=30,.parent=15"
|
||||
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=31,.parent=17"
|
||||
_StyleDefs(38) = "Splits(0).Columns(2).Style:id=46,.parent=13"
|
||||
_StyleDefs(39) = "Splits(0).Columns(2).HeadingStyle:id=43,.parent=14"
|
||||
_StyleDefs(40) = "Splits(0).Columns(2).FooterStyle:id=44,.parent=15"
|
||||
_StyleDefs(41) = "Splits(0).Columns(2).EditorStyle:id=45,.parent=17"
|
||||
_StyleDefs(42) = "Splits(0).Columns(3).Style:id=50,.parent=13"
|
||||
_StyleDefs(43) = "Splits(0).Columns(3).HeadingStyle:id=47,.parent=14"
|
||||
_StyleDefs(44) = "Splits(0).Columns(3).FooterStyle:id=48,.parent=15"
|
||||
_StyleDefs(45) = "Splits(0).Columns(3).EditorStyle:id=49,.parent=17"
|
||||
_StyleDefs(46) = "Splits(0).Columns(4).Style:id=54,.parent=13"
|
||||
_StyleDefs(47) = "Splits(0).Columns(4).HeadingStyle:id=51,.parent=14"
|
||||
_StyleDefs(48) = "Splits(0).Columns(4).FooterStyle:id=52,.parent=15"
|
||||
_StyleDefs(49) = "Splits(0).Columns(4).EditorStyle:id=53,.parent=17"
|
||||
_StyleDefs(50) = "Splits(0).Columns(5).Style:id=58,.parent=13"
|
||||
_StyleDefs(51) = "Splits(0).Columns(5).HeadingStyle:id=55,.parent=14"
|
||||
_StyleDefs(52) = "Splits(0).Columns(5).FooterStyle:id=56,.parent=15"
|
||||
_StyleDefs(53) = "Splits(0).Columns(5).EditorStyle:id=57,.parent=17"
|
||||
_StyleDefs(54) = "Splits(0).Columns(6).Style:id=62,.parent=13"
|
||||
_StyleDefs(55) = "Splits(0).Columns(6).HeadingStyle:id=59,.parent=14"
|
||||
_StyleDefs(56) = "Splits(0).Columns(6).FooterStyle:id=60,.parent=15"
|
||||
_StyleDefs(57) = "Splits(0).Columns(6).EditorStyle:id=61,.parent=17"
|
||||
_StyleDefs(58) = "Splits(0).Columns(7).Style:id=66,.parent=13"
|
||||
_StyleDefs(59) = "Splits(0).Columns(7).HeadingStyle:id=63,.parent=14"
|
||||
_StyleDefs(60) = "Splits(0).Columns(7).FooterStyle:id=64,.parent=15"
|
||||
_StyleDefs(61) = "Splits(0).Columns(7).EditorStyle:id=65,.parent=17"
|
||||
_StyleDefs(62) = "Splits(0).Columns(8).Style:id=70,.parent=13"
|
||||
_StyleDefs(63) = "Splits(0).Columns(8).HeadingStyle:id=67,.parent=14"
|
||||
_StyleDefs(64) = "Splits(0).Columns(8).FooterStyle:id=68,.parent=15"
|
||||
_StyleDefs(65) = "Splits(0).Columns(8).EditorStyle:id=69,.parent=17"
|
||||
_StyleDefs(66) = "Splits(0).Columns(9).Style:id=74,.parent=13"
|
||||
_StyleDefs(67) = "Splits(0).Columns(9).HeadingStyle:id=71,.parent=14"
|
||||
_StyleDefs(68) = "Splits(0).Columns(9).FooterStyle:id=72,.parent=15"
|
||||
_StyleDefs(69) = "Splits(0).Columns(9).EditorStyle:id=73,.parent=17"
|
||||
_StyleDefs(70) = "Splits(0).Columns(10).Style:id=78,.parent=13"
|
||||
_StyleDefs(71) = "Splits(0).Columns(10).HeadingStyle:id=75,.parent=14"
|
||||
_StyleDefs(72) = "Splits(0).Columns(10).FooterStyle:id=76,.parent=15"
|
||||
_StyleDefs(73) = "Splits(0).Columns(10).EditorStyle:id=77,.parent=17"
|
||||
_StyleDefs(74) = "Splits(0).Columns(11).Style:id=82,.parent=13"
|
||||
_StyleDefs(75) = "Splits(0).Columns(11).HeadingStyle:id=79,.parent=14"
|
||||
_StyleDefs(76) = "Splits(0).Columns(11).FooterStyle:id=80,.parent=15"
|
||||
_StyleDefs(77) = "Splits(0).Columns(11).EditorStyle:id=81,.parent=17"
|
||||
_StyleDefs(78) = "Named:id=33:Normal"
|
||||
_StyleDefs(79) = ":id=33,.parent=0"
|
||||
_StyleDefs(80) = "Named:id=34:Heading"
|
||||
_StyleDefs(81) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(82) = ":id=34,.wraptext=-1"
|
||||
_StyleDefs(83) = "Named:id=35:Footing"
|
||||
_StyleDefs(84) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(85) = "Named:id=36:Selected"
|
||||
_StyleDefs(86) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(87) = "Named:id=37:Caption"
|
||||
_StyleDefs(88) = ":id=37,.parent=34,.alignment=2"
|
||||
_StyleDefs(89) = "Named:id=38:HighlightRow"
|
||||
_StyleDefs(90) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(91) = "Named:id=39:EvenRow"
|
||||
_StyleDefs(92) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
|
||||
_StyleDefs(93) = "Named:id=40:OddRow"
|
||||
_StyleDefs(94) = ":id=40,.parent=33"
|
||||
_StyleDefs(95) = "Named:id=41:RecordSelector"
|
||||
_StyleDefs(96) = ":id=41,.parent=34"
|
||||
_StyleDefs(97) = "Named:id=42:FilterBar"
|
||||
_StyleDefs(98) = ":id=42,.parent=33"
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmContractor2"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRS As Recordset
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRS.AddNew
|
||||
TDBGLabor.SetFocus
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRS.Delete
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
moRS.MoveFirst
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
moRS.MoveLast
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
moRS.MoveNext
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
moRS.MovePrevious
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRS.Update
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call LoadLabor
|
||||
TDBGLabor.DataSource = moRS
|
||||
TDBGLabor.ReBind
|
||||
Exit Sub
|
||||
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadLabor()
|
||||
Dim strSQL As String
|
||||
|
||||
strSQL = "SELECT * FROM tblConInfo ORDER by CONTRCR"
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
@@ -0,0 +1,231 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form frmContractor1
|
||||
Caption = "Contractor Information"
|
||||
ClientHeight = 5460
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 9045
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 5460
|
||||
ScaleWidth = 9045
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdCExit
|
||||
Caption = "Exit"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 12
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 735
|
||||
Left = 7320
|
||||
TabIndex = 21
|
||||
Top = 4320
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdCSave
|
||||
Caption = "Save"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 12
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 735
|
||||
Left = 5700
|
||||
TabIndex = 20
|
||||
Top = 4320
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.CommandButton cmdCAdd
|
||||
Caption = "Add"
|
||||
BeginProperty Font
|
||||
Name = "MS Sans Serif"
|
||||
Size = 12
|
||||
Charset = 0
|
||||
Weight = 700
|
||||
Underline = 0 'False
|
||||
Italic = 0 'False
|
||||
Strikethrough = 0 'False
|
||||
EndProperty
|
||||
Height = 735
|
||||
Left = 4140
|
||||
TabIndex = 19
|
||||
Top = 4320
|
||||
Width = 1275
|
||||
End
|
||||
Begin VB.TextBox Text9
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 18
|
||||
Top = 3720
|
||||
Width = 1635
|
||||
End
|
||||
Begin VB.TextBox Text8
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 17
|
||||
Top = 3300
|
||||
Width = 1635
|
||||
End
|
||||
Begin VB.TextBox Text7
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 16
|
||||
Top = 2880
|
||||
Width = 735
|
||||
End
|
||||
Begin VB.TextBox Text6
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 15
|
||||
Top = 2460
|
||||
Width = 3675
|
||||
End
|
||||
Begin VB.TextBox txtCAdd2
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 14
|
||||
Top = 2040
|
||||
Width = 3675
|
||||
End
|
||||
Begin VB.TextBox txtCAdd1
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 13
|
||||
Top = 1620
|
||||
Width = 3675
|
||||
End
|
||||
Begin VB.TextBox txtCContact
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 12
|
||||
Top = 1200
|
||||
Width = 3675
|
||||
End
|
||||
Begin VB.TextBox txtCName
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 11
|
||||
Top = 780
|
||||
Width = 3675
|
||||
End
|
||||
Begin VB.TextBox txtCID
|
||||
Height = 315
|
||||
Left = 4800
|
||||
TabIndex = 10
|
||||
Top = 360
|
||||
Width = 795
|
||||
End
|
||||
Begin VB.ListBox lstContractor
|
||||
Height = 4740
|
||||
Left = 240
|
||||
TabIndex = 0
|
||||
Top = 300
|
||||
Width = 3315
|
||||
End
|
||||
Begin VB.Label lblCFAX
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "FAX Number:"
|
||||
Height = 195
|
||||
Left = 3780
|
||||
TabIndex = 9
|
||||
Top = 3780
|
||||
Width = 945
|
||||
End
|
||||
Begin VB.Label lblCOPhone
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Office Phone:"
|
||||
Height = 195
|
||||
Left = 3780
|
||||
TabIndex = 8
|
||||
Top = 3360
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.Label lblCState
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "State:"
|
||||
Height = 195
|
||||
Left = 4320
|
||||
TabIndex = 7
|
||||
Top = 2940
|
||||
Width = 420
|
||||
End
|
||||
Begin VB.Label lblCCity
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "City:"
|
||||
Height = 195
|
||||
Left = 4380
|
||||
TabIndex = 6
|
||||
Top = 2460
|
||||
Width = 300
|
||||
End
|
||||
Begin VB.Label lblCAdd2
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address 2:"
|
||||
Height = 195
|
||||
Left = 3960
|
||||
TabIndex = 5
|
||||
Top = 2100
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblCAdd1
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Address 1:"
|
||||
Height = 195
|
||||
Left = 3960
|
||||
TabIndex = 4
|
||||
Top = 1680
|
||||
Width = 750
|
||||
End
|
||||
Begin VB.Label lblCContact
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Contact:"
|
||||
Height = 195
|
||||
Left = 4140
|
||||
TabIndex = 3
|
||||
Top = 1260
|
||||
Width = 600
|
||||
End
|
||||
Begin VB.Label lblCName
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "Name:"
|
||||
Height = 195
|
||||
Left = 4260
|
||||
TabIndex = 2
|
||||
Top = 780
|
||||
Width = 465
|
||||
End
|
||||
Begin VB.Label lblCID
|
||||
Alignment = 1 'Right Justify
|
||||
AutoSize = -1 'True
|
||||
Caption = "ID:"
|
||||
Height = 195
|
||||
Left = 4500
|
||||
TabIndex = 1
|
||||
Top = 420
|
||||
Width = 210
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmContractor1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
|
||||
|
||||
@@ -0,0 +1,357 @@
|
||||
VERSION 5.00
|
||||
Object = "{DEF7CADD-83C0-11D0-A0F1-00A024703500}#7.0#0"; "TODG7.OCX"
|
||||
Begin VB.Form frmCrew
|
||||
Caption = "Lath & Stucco Crews"
|
||||
ClientHeight = 9195
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 8025
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 9195
|
||||
ScaleWidth = 8025
|
||||
StartUpPosition = 3 'Windows Default
|
||||
Begin VB.CommandButton cmdExit
|
||||
Caption = "Exit"
|
||||
Height = 555
|
||||
Left = 5220
|
||||
TabIndex = 8
|
||||
Top = 8280
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdAdd
|
||||
Caption = "Add"
|
||||
Height = 555
|
||||
Left = 3500
|
||||
TabIndex = 7
|
||||
Top = 8280
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdDelete
|
||||
Caption = "Delete"
|
||||
Height = 555
|
||||
Left = 1780
|
||||
TabIndex = 6
|
||||
Top = 8280
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdSave
|
||||
Caption = "Save"
|
||||
Height = 555
|
||||
Left = 60
|
||||
TabIndex = 5
|
||||
Top = 8280
|
||||
Width = 1395
|
||||
End
|
||||
Begin VB.CommandButton cmdFirst
|
||||
Height = 300
|
||||
Left = 2640
|
||||
Picture = "frmCrew.frx":0000
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 4
|
||||
Top = 8880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdPrevious
|
||||
Height = 300
|
||||
Left = 3000
|
||||
Picture = "frmCrew.frx":0342
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 3
|
||||
Top = 8880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdNext
|
||||
Height = 300
|
||||
Left = 3345
|
||||
Picture = "frmCrew.frx":0684
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 2
|
||||
Top = 8880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin VB.CommandButton cmdLast
|
||||
Height = 300
|
||||
Left = 3705
|
||||
Picture = "frmCrew.frx":09C6
|
||||
Style = 1 'Graphical
|
||||
TabIndex = 1
|
||||
Top = 8880
|
||||
UseMaskColor = -1 'True
|
||||
Width = 345
|
||||
End
|
||||
Begin TrueOleDBGrid70.TDBGrid TDBGLabor
|
||||
Height = 8175
|
||||
Left = 60
|
||||
TabIndex = 0
|
||||
Top = 60
|
||||
Width = 7860
|
||||
_ExtentX = 13864
|
||||
_ExtentY = 14420
|
||||
_LayoutType = 4
|
||||
_RowHeight = -2147483647
|
||||
_WasPersistedAsPixels= 0
|
||||
Columns(0)._VlistStyle= 0
|
||||
Columns(0)._MaxComboItems= 5
|
||||
Columns(0).Caption= "Crew #"
|
||||
Columns(0).DataField= "Crew_id"
|
||||
Columns(0)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(1)._VlistStyle= 0
|
||||
Columns(1)._MaxComboItems= 5
|
||||
Columns(1).Caption= "Crew Leader"
|
||||
Columns(1).DataField= "crew_boss"
|
||||
Columns(1).DataWidth= 30
|
||||
Columns(1)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(2)._VlistStyle= 0
|
||||
Columns(2)._MaxComboItems= 5
|
||||
Columns(2).Caption= "Phone"
|
||||
Columns(2).DataField= "phone"
|
||||
Columns(2).DataWidth= 10
|
||||
Columns(2).DefaultValue= "0"
|
||||
Columns(2).DefaultValue.vt= 8
|
||||
Columns(2).NumberFormat= "General Number"
|
||||
Columns(2)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns(3)._VlistStyle= 16
|
||||
Columns(3)._MaxComboItems= 5
|
||||
Columns(3).ValueItems(0)._DefaultItem= 0
|
||||
Columns(3).ValueItems(0).Value= "L"
|
||||
Columns(3).ValueItems(0).Value.vt= 8
|
||||
Columns(3).ValueItems(0).DisplayValue= "Lath"
|
||||
Columns(3).ValueItems(0).DisplayValue.vt= 8
|
||||
Columns(3).ValueItems(0)._PropDict= "_DefaultItem,517,2"
|
||||
Columns(3).ValueItems(1)._DefaultItem= 0
|
||||
Columns(3).ValueItems(1).Value= "S"
|
||||
Columns(3).ValueItems(1).Value.vt= 8
|
||||
Columns(3).ValueItems(1).DisplayValue= "Stucco"
|
||||
Columns(3).ValueItems(1).DisplayValue.vt= 8
|
||||
Columns(3).ValueItems(1)._PropDict= "_DefaultItem,517,2"
|
||||
Columns(3).ValueItems.Count= 2
|
||||
Columns(3).Caption= "Crew Type"
|
||||
Columns(3).DataField= "type"
|
||||
Columns(3).DataWidth= 1
|
||||
Columns(3)._PropDict= "_MaxComboItems,516,2;_VlistStyle,514,3"
|
||||
Columns.Count = 4
|
||||
Splits(0)._UserFlags= 0
|
||||
Splits(0).RecordSelectorWidth= 503
|
||||
Splits(0)._SavedRecordSelectors= 0 'False
|
||||
Splits(0).DividerColor= 12632256
|
||||
Splits(0).SpringMode= 0 'False
|
||||
Splits(0)._PropDict= "_ColumnProps,515,0;_UserFlags,518,3"
|
||||
Splits(0)._ColumnProps(0)= "Columns.Count=4"
|
||||
Splits(0)._ColumnProps(1)= "Column(0).Width=1244"
|
||||
Splits(0)._ColumnProps(2)= "Column(0).DividerColor=0"
|
||||
Splits(0)._ColumnProps(3)= "Column(0)._WidthInPix=1164"
|
||||
Splits(0)._ColumnProps(4)= "Column(0).Order=1"
|
||||
Splits(0)._ColumnProps(5)= "Column(1).Width=5741"
|
||||
Splits(0)._ColumnProps(6)= "Column(1).DividerColor=0"
|
||||
Splits(0)._ColumnProps(7)= "Column(1)._WidthInPix=5662"
|
||||
Splits(0)._ColumnProps(8)= "Column(1).Order=2"
|
||||
Splits(0)._ColumnProps(9)= "Column(2).Width=1958"
|
||||
Splits(0)._ColumnProps(10)= "Column(2).DividerColor=0"
|
||||
Splits(0)._ColumnProps(11)= "Column(2)._WidthInPix=1879"
|
||||
Splits(0)._ColumnProps(12)= "Column(2).Order=3"
|
||||
Splits(0)._ColumnProps(13)= "Column(3).Width=2725"
|
||||
Splits(0)._ColumnProps(14)= "Column(3).DividerColor=0"
|
||||
Splits(0)._ColumnProps(15)= "Column(3)._WidthInPix=2646"
|
||||
Splits(0)._ColumnProps(16)= "Column(3).Order=4"
|
||||
Splits(0)._ColumnProps(17)= "Column(3)._MinWidth=24"
|
||||
Splits.Count = 1
|
||||
PrintInfos(0)._StateFlags= 0
|
||||
PrintInfos(0).Name= "piInternal 0"
|
||||
PrintInfos(0).PageHeaderFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageFooterFont= "Size=8.25,Charset=0,Weight=400,Underline=0,Italic=0,Strikethrough=0,Name=MS Sans Serif"
|
||||
PrintInfos(0).PageHeaderHeight= 0
|
||||
PrintInfos(0).PageFooterHeight= 0
|
||||
PrintInfos.Count= 1
|
||||
AllowDelete = -1 'True
|
||||
AllowAddNew = -1 'True
|
||||
DefColWidth = 0
|
||||
HeadLines = 1
|
||||
FootLines = 1
|
||||
MultipleLines = 0
|
||||
CellTipsWidth = 0
|
||||
DeadAreaBackColor= 12632256
|
||||
RowDividerColor = 12632256
|
||||
RowSubDividerColor= 12632256
|
||||
DirectionAfterEnter= 1
|
||||
MaxRows = 250000
|
||||
ViewColumnCaptionWidth= 0
|
||||
ViewColumnWidth = 0
|
||||
_PropDict = "_ExtentX,2003,3;_ExtentY,2004,3;_LayoutType,512,2;_RowHeight,16,3;_StyleDefs,513,0;_WasPersistedAsPixels,516,2"
|
||||
_StyleDefs(0) = "_StyleRoot:id=0,.parent=-1,.alignment=3,.valignment=0,.bgcolor=&H80000005&"
|
||||
_StyleDefs(1) = ":id=0,.fgcolor=&H80000008&,.wraptext=0,.locked=0,.transparentBmp=0"
|
||||
_StyleDefs(2) = ":id=0,.fgpicPosition=0,.bgpicMode=0,.appearance=0,.borderSize=0,.ellipsis=0"
|
||||
_StyleDefs(3) = ":id=0,.borderColor=&H80000005&,.borderType=0,.bold=0,.fontsize=825,.italic=0"
|
||||
_StyleDefs(4) = ":id=0,.underline=0,.strikethrough=0,.charset=0"
|
||||
_StyleDefs(5) = ":id=0,.fontname=MS Sans Serif"
|
||||
_StyleDefs(6) = "Style:id=1,.parent=0,.namedParent=33"
|
||||
_StyleDefs(7) = "CaptionStyle:id=4,.parent=2,.namedParent=37"
|
||||
_StyleDefs(8) = "HeadingStyle:id=2,.parent=1,.namedParent=34"
|
||||
_StyleDefs(9) = "FooterStyle:id=3,.parent=1,.namedParent=35"
|
||||
_StyleDefs(10) = "InactiveStyle:id=5,.parent=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(11) = "SelectedStyle:id=6,.parent=1,.namedParent=36"
|
||||
_StyleDefs(12) = "EditorStyle:id=7,.parent=1"
|
||||
_StyleDefs(13) = "HighlightRowStyle:id=8,.parent=1,.namedParent=38"
|
||||
_StyleDefs(14) = "EvenRowStyle:id=9,.parent=1,.namedParent=39"
|
||||
_StyleDefs(15) = "OddRowStyle:id=10,.parent=1,.namedParent=40"
|
||||
_StyleDefs(16) = "RecordSelectorStyle:id=11,.parent=2,.namedParent=41"
|
||||
_StyleDefs(17) = "FilterBarStyle:id=12,.parent=1,.namedParent=42"
|
||||
_StyleDefs(18) = "Splits(0).Style:id=13,.parent=1"
|
||||
_StyleDefs(19) = "Splits(0).CaptionStyle:id=22,.parent=4"
|
||||
_StyleDefs(20) = "Splits(0).HeadingStyle:id=14,.parent=2"
|
||||
_StyleDefs(21) = "Splits(0).FooterStyle:id=15,.parent=3"
|
||||
_StyleDefs(22) = "Splits(0).InactiveStyle:id=16,.parent=5"
|
||||
_StyleDefs(23) = "Splits(0).SelectedStyle:id=18,.parent=6"
|
||||
_StyleDefs(24) = "Splits(0).EditorStyle:id=17,.parent=7"
|
||||
_StyleDefs(25) = "Splits(0).HighlightRowStyle:id=19,.parent=8"
|
||||
_StyleDefs(26) = "Splits(0).EvenRowStyle:id=20,.parent=9"
|
||||
_StyleDefs(27) = "Splits(0).OddRowStyle:id=21,.parent=10"
|
||||
_StyleDefs(28) = "Splits(0).RecordSelectorStyle:id=23,.parent=11"
|
||||
_StyleDefs(29) = "Splits(0).FilterBarStyle:id=24,.parent=12"
|
||||
_StyleDefs(30) = "Splits(0).Columns(0).Style:id=50,.parent=13"
|
||||
_StyleDefs(31) = "Splits(0).Columns(0).HeadingStyle:id=47,.parent=14"
|
||||
_StyleDefs(32) = "Splits(0).Columns(0).FooterStyle:id=48,.parent=15"
|
||||
_StyleDefs(33) = "Splits(0).Columns(0).EditorStyle:id=49,.parent=17"
|
||||
_StyleDefs(34) = "Splits(0).Columns(1).Style:id=28,.parent=13"
|
||||
_StyleDefs(35) = "Splits(0).Columns(1).HeadingStyle:id=25,.parent=14"
|
||||
_StyleDefs(36) = "Splits(0).Columns(1).FooterStyle:id=26,.parent=15"
|
||||
_StyleDefs(37) = "Splits(0).Columns(1).EditorStyle:id=27,.parent=17"
|
||||
_StyleDefs(38) = "Splits(0).Columns(2).Style:id=32,.parent=13"
|
||||
_StyleDefs(39) = "Splits(0).Columns(2).HeadingStyle:id=29,.parent=14"
|
||||
_StyleDefs(40) = "Splits(0).Columns(2).FooterStyle:id=30,.parent=15"
|
||||
_StyleDefs(41) = "Splits(0).Columns(2).EditorStyle:id=31,.parent=17"
|
||||
_StyleDefs(42) = "Splits(0).Columns(3).Style:id=46,.parent=13"
|
||||
_StyleDefs(43) = "Splits(0).Columns(3).HeadingStyle:id=43,.parent=14"
|
||||
_StyleDefs(44) = "Splits(0).Columns(3).FooterStyle:id=44,.parent=15"
|
||||
_StyleDefs(45) = "Splits(0).Columns(3).EditorStyle:id=45,.parent=17"
|
||||
_StyleDefs(46) = "Named:id=33:Normal"
|
||||
_StyleDefs(47) = ":id=33,.parent=0"
|
||||
_StyleDefs(48) = "Named:id=34:Heading"
|
||||
_StyleDefs(49) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(50) = ":id=34,.wraptext=-1"
|
||||
_StyleDefs(51) = "Named:id=35:Footing"
|
||||
_StyleDefs(52) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
|
||||
_StyleDefs(53) = "Named:id=36:Selected"
|
||||
_StyleDefs(54) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(55) = "Named:id=37:Caption"
|
||||
_StyleDefs(56) = ":id=37,.parent=34,.alignment=2"
|
||||
_StyleDefs(57) = "Named:id=38:HighlightRow"
|
||||
_StyleDefs(58) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
|
||||
_StyleDefs(59) = "Named:id=39:EvenRow"
|
||||
_StyleDefs(60) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
|
||||
_StyleDefs(61) = "Named:id=40:OddRow"
|
||||
_StyleDefs(62) = ":id=40,.parent=33"
|
||||
_StyleDefs(63) = "Named:id=41:RecordSelector"
|
||||
_StyleDefs(64) = ":id=41,.parent=34"
|
||||
_StyleDefs(65) = "Named:id=42:FilterBar"
|
||||
_StyleDefs(66) = ":id=42,.parent=33"
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "frmCrew"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
||||
Option Explicit
|
||||
Dim moRS As Recordset
|
||||
|
||||
Private Sub cmdAdd_Click()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRS.AddNew
|
||||
TDBGLabor.SetFocus
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdDelete_Click()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRS.Delete
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmdExit_Click()
|
||||
Unload Me
|
||||
End Sub
|
||||
|
||||
Private Sub cmdFirst_Click()
|
||||
moRS.MoveFirst
|
||||
End Sub
|
||||
|
||||
Private Sub cmdLast_Click()
|
||||
moRS.MoveLast
|
||||
End Sub
|
||||
|
||||
Private Sub cmdNext_Click()
|
||||
moRS.MoveNext
|
||||
End Sub
|
||||
|
||||
Private Sub cmdPrevious_Click()
|
||||
moRS.MovePrevious
|
||||
End Sub
|
||||
|
||||
Private Sub cmdSave_Click()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
moRS.Update
|
||||
Exit Sub
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form_Load()
|
||||
Err.Clear
|
||||
On Error GoTo Error_EH
|
||||
|
||||
Call LoadLabor
|
||||
TDBGLabor.DataSource = moRS
|
||||
TDBGLabor.ReBind
|
||||
Exit Sub
|
||||
|
||||
|
||||
Error_EH:
|
||||
If Err = "-2147217887" Then
|
||||
Resume Next
|
||||
Else
|
||||
Call ErrorHandler(moRS.ActiveConnection)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadLabor()
|
||||
Dim strSQL As String
|
||||
|
||||
strSQL = "SELECT * FROM tblCrew"
|
||||
|
||||
Set moRS = New Recordset
|
||||
|
||||
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
||||
|
||||
End Sub
|
||||
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user