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