home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 4.00 Begin VB.Form frmMain BorderStyle = 3 'Fixed Dialog Caption = "Best Team Selector" ClientHeight = 6105 ClientLeft = 1230 ClientTop = 2280 ClientWidth = 8670 Height = 6795 Icon = "Main.frx":0000 Left = 1170 LinkTopic = "Form1" LockControls = -1 'True MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 6105 ScaleWidth = 8670 ShowInTaskbar = 0 'False Top = 1650 Visible = 0 'False Width = 8790 Begin VB.Data dbaCandidateProject Caption = "CandidateProject" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 4290 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qryCandidateProject" Top = 360 Visible = 0 'False Width = 2145 End Begin VB.Data dbaSkillJob Caption = "SkillJob" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 4320 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qrySkillJob" Top = 30 Visible = 0 'False Width = 2145 End Begin VB.Data dbaProject Caption = "Project" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 6450 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qryProject" Top = 330 Visible = 0 'False Width = 2145 End Begin VB.Data dbaJobtitle Caption = "Jobtitle" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 2130 Options = 0 ReadOnly = 0 'False RecordsetType = 2 'Snapshot RecordSource = "tblJobtitle" Top = 330 Visible = 0 'False Width = 2145 End Begin VB.Data dbaCandidateSkill Caption = "CandidateSkill" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 0 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qryCandidateSkillRating" Top = 330 Visible = 0 'False Width = 2145 End Begin VB.Data dbaJobProject Caption = "JobProject" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 2130 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qryJobProject" Top = 30 Visible = 0 'False Width = 2145 End Begin VB.Data dbaSkills Caption = "Skills " Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 0 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qrySkill" Top = 30 Visible = 0 'False Width = 2145 End Begin MSComDlg.CommonDialog CMDialog1 Left = -30 Top = 720 _Version = 65536 _ExtentX = 847 _ExtentY = 847 _StockProps = 0 End Begin TabDlg.SSTab tabMain Height = 5805 Left = 120 TabIndex = 0 Top = 180 Width = 8415 _Version = 65536 _ExtentX = 14843 _ExtentY = 10239 _StockProps = 15 Caption = "Tea&m" TabsPerRow = 5 Tab = 4 TabOrientation = 1 Tabs = 5 Style = 0 TabMaxWidth = 0 TabHeight = 529 WordWrap = 0 'False TabCaption(0) = "&Candidates" Tab(0).ControlCount= 1 Tab(0).ControlEnabled= 0 'False Tab(0).Control(0)= "Picture1" TabCaption(1) = "&Skills" Tab(1).ControlCount= 1 Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "fmeSkills" TabCaption(2) = "&Titles" Tab(2).ControlCount= 1 Tab(2).ControlEnabled= 0 'False Tab(2).Control(0)= "fmeTitles" TabCaption(3) = "&Projects" Tab(3).ControlCount= 1 Tab(3).ControlEnabled= 0 'False Tab(3).Control(0)= "fmeProjects" TabCaption(4) = "Tea&m" Tab(4).ControlCount= 1 Tab(4).ControlEnabled= -1 'True Tab(4).Control(0)= "fmeTeam" Begin VB.Frame fmeProjects Height = 5385 Left = -74910 TabIndex = 69 Top = 30 Width = 8265 Begin VB.CommandButton cmdDelProject Caption = "Delete" Height = 495 Left = 1320 TabIndex = 77 Top = 4710 Width = 1485 End Begin VB.CommandButton cmdEditProject Caption = "Ed&it" Height = 495 Left = 2100 TabIndex = 76 Top = 4170 Width = 1485 End Begin VB.CommandButton cmdAddProject Caption = "&Add" Height = 495 Left = 570 TabIndex = 75 Top = 4170 Width = 1485 End Begin VB.TextBox txtProjectKey BackColor = &H00FFFF00& DataField = "ProjectKey" DataSource = "dbaProject" Height = 315 Left = 3690 TabIndex = 74 Text = "-1" Top = 510 Visible = 0 'False Width = 405 End Begin VB.Frame fmeTitlesOfProject Caption = "Titles of Selected Project" Height = 4785 Left = 4290 TabIndex = 70 Top = 420 Width = 3585 Begin VB.CommandButton cmdDelJobProject Caption = "Remove" Height = 495 Left = 1830 TabIndex = 72 Top = 4170 Width = 1485 End Begin VB.CommandButton cmdAddJobProject Caption = "Add" Height = 495 Left = 300 TabIndex = 71 Top = 4170 Width = 1485 End Begin MSDBCtls.DBList lstJobProject Bindings = "Main.frx":030A Height = 3570 Left = 300 TabIndex = 73 Top = 330 Width = 3015 _Version = 65536 _ExtentX = 5318 _ExtentY = 6297 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 ListField = "tblJobtitle.Name" BoundColumn = "JobProjectKey" End End Begin MSDBCtls.DBList lstProject Bindings = "Main.frx":0320 Height = 3570 Left = 570 TabIndex = 78 Top = 510 Width = 2985 _Version = 65536 _ExtentX = 5265 _ExtentY = 6297 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 ListField = "Name" BoundColumn = "ProjectKey" End End Begin VB.Frame fmeTitles Height = 5385 Left = -74910 TabIndex = 59 Top = 30 Width = 8265 Begin VB.Frame fmeSkillsOfTitle Caption = "Skills of Selected Title" Height = 4785 Left = 4290 TabIndex = 65 Top = 420 Width = 3585 Begin VB.CommandButton cmdAddJobSkills Caption = "Add" Height = 495 Left = 300 TabIndex = 67 Top = 4170 Width = 1485 End Begin VB.CommandButton cmdDelJobSkills Caption = "Remove" Height = 495 Left = 1830 TabIndex = 66 Top = 4170 Width = 1485 End Begin MSDBCtls.DBList lstSkillJob Bindings = "Main.frx":0333 Height = 3570 Left = 300 TabIndex = 68 Top = 330 Width = 3015 _Version = 65536 _ExtentX = 5318 _ExtentY = 6297 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 ListField = "tblSkill.Name" BoundColumn = "SkillJobKey" End End Begin VB.TextBox txtJobtitleKey BackColor = &H00FFFF00& DataField = "JobtitleKey" DataSource = "dbaJobtitle" Height = 315 Left = 3690 TabIndex = 64 Text = "-1" Top = 510 Visible = 0 'False Width = 405 End Begin VB.CommandButton cmdAddTitle Caption = "&Add" Height = 495 Left = 570 TabIndex = 62 Top = 4170 Width = 1485 End Begin VB.CommandButton cmdEditTitle Caption = "Ed&it" Height = 495 Left = 2100 TabIndex = 61 Top = 4170 Width = 1485 End Begin VB.CommandButton cmdDelTitle Caption = "Delete" Height = 495 Left = 1320 TabIndex = 60 Top = 4710 Width = 1485 End Begin MSDBCtls.DBList lstJobtitles Bindings = "Main.frx":0347 Height = 3570 Left = 570 TabIndex = 63 Top = 510 Width = 2985 _Version = 65536 _ExtentX = 5265 _ExtentY = 6297 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 ListField = "Name" BoundColumn = "JobtitleKey" End End Begin VB.PictureBox Picture1 BorderStyle = 0 'None Height = 5385 Left = -74970 ScaleHeight = 5385 ScaleWidth = 8325 TabIndex = 7 Top = 30 Width = 8325 Begin VB.CommandButton cmdDelCandidate Caption = "Delete Candidate" Height = 315 Left = 6360 TabIndex = 25 Top = 4980 Width = 1755 End Begin VB.CommandButton cmdAddCandidate Caption = "&Add Candidate" Height = 315 Left = 4500 TabIndex = 24 Top = 4980 Width = 1755 End Begin VB.Data dbaCandidate BackColor = &H00C0C0C0& Caption = "Candidate Scroll" Connect = "Access" DatabaseName = "" Exclusive = 0 'False Height = 300 Left = 1830 Options = 0 ReadOnly = 0 'False RecordsetType = 1 'Dynaset RecordSource = "qryCandidate" Top = 4980 Width = 2535 End Begin TabDlg.SSTab tabCandidates Height = 5055 Left = 210 TabIndex = 8 Top = 180 Width = 7935 _Version = 65536 _ExtentX = 13996 _ExtentY = 8916 _StockProps = 15 Caption = "Detail" TabsPerRow = 2 Tab = 0 TabOrientation = 1 Tabs = 2 Style = 1 TabMaxWidth = 0 TabHeight = 529 TabCaption(0) = "Detail" Tab(0).ControlCount= 1 Tab(0).ControlEnabled= -1 'True Tab(0).Control(0)= "Picture2" TabCaption(1) = "Summary" Tab(1).ControlCount= 1 Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "Picture3" Begin VB.PictureBox Picture3 Height = 4455 Left = -74940 ScaleHeight = 4395 ScaleWidth = 7695 TabIndex = 52 Top = 240 Width = 7755 Begin MSDBCtls.DBList lstCandidate Bindings = "Main.frx":035B Height = 3885 Left = 450 TabIndex = 54 Top = 240 Width = 6675 _Version = 65536 _ExtentX = 11774 _ExtentY = 6853 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 BeginProperty Font {FB8F0823-0164-101B-84ED-08002B2EC713} name = "Courier New" charset = 0 weight = 400 size = 9 underline = 0 'False italic = 0 'False strikethrough = 0 'False EndProperty ListField = "Combined" BoundColumn = "CandidateKey" End End Begin VB.PictureBox Picture2 BorderStyle = 0 'None Height = 4575 Left = 60 ScaleHeight = 4575 ScaleWidth = 7755 TabIndex = 9 Top = 150 Width = 7755 Begin VB.TextBox txtCandidateKey BackColor = &H00FFFF00& DataField = "CandidateKey" DataSource = "dbaCandidate" Height = 315 Left = 1680 TabIndex = 80 Text = "-1" Top = 3780 Visible = 0 'False Width = 735 End Begin VB.PictureBox pctPicture DataField = "Picture" DataSource = "dbaCandidate" Height = 2655 Left = 30 ScaleHeight = 2595 ScaleMode = 0 'User ScaleWidth = 2295 TabIndex = 41 Top = 360 Width = 2355 Begin VB.Label lblNoPicture Alignment = 2 'Center Appearance = 0 'Flat BackColor = &H00C0C0C0& Caption = "No Picture" BeginProperty Font name = "MS Sans Serif" charset = 0 weight = 700 size = 12 underline = 0 'False italic = 0 'False strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 735 Left = 540 TabIndex = 44 Top = 930 Width = 1095 End End Begin VB.TextBox txtTitle DataField = "Title" DataSource = "dbaCandidate" Height = 285 Left = 60 MaxLength = 4 TabIndex = 16 Top = 4110 Width = 615 End Begin VB.TextBox txtPhone DataField = "Phone" DataSource = "dbaCandidate" Height = 285 Left = 6390 MaxLength = 15 TabIndex = 15 Top = 4110 Width = 1215 End Begin VB.TextBox Text3 DataField = "LastName" DataSource = "dbaCandidate" Height = 285 Left = 3420 MaxLength = 25 TabIndex = 14 Top = 4110 Width = 2055 End Begin VB.TextBox Text2 DataField = "MiddleInitial" DataSource = "dbaCandidate" Height = 285 Left = 2940 MaxLength = 1 TabIndex = 13 Top = 4110 Width = 375 End Begin VB.TextBox txtFirstName DataField = "FirstName" DataSource = "dbaCandidate" Height = 285 Left = 780 MaxLength = 20 TabIndex = 12 Top = 4110 Width = 2055 End Begin VB.CheckBox chkAvailable Caption = "A&vailable for New Projects" DataField = "Available" DataSource = "dbaCandidate" Height = 375 Left = 90 TabIndex = 11 Top = 3150 Width = 2175 End Begin VB.Frame fmeCandSkills Caption = "Skills of Candidate" Height = 3495 Left = 2460 TabIndex = 10 Top = 270 Width = 5265 Begin TabDlg.SSTab tabCandidateSkill Height = 3225 Left = 60 TabIndex = 26 Top = 210 Width = 5115 _Version = 65536 _ExtentX = 9022 _ExtentY = 5689 _StockProps = 15 Caption = "List" TabsPerRow = 4 Tab = 0 TabOrientation = 0 Tabs = 4 Style = 0 TabMaxWidth = 0 TabHeight = 529 TabCaption(0) = "List" Tab(0).ControlCount= 1 Tab(0).ControlEnabled= -1 'True Tab(0).Control(0)= "picListCandidateSkill" TabCaption(1) = "Add" Tab(1).ControlCount= 1 Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "picAddCandidateSkill" TabCaption(2) = "Edit" Tab(2).ControlCount= 1 Tab(2).ControlEnabled= 0 'False Tab(2).Control(0)= "picEditCandidateSkill" TabCaption(3) = "Delete" Tab(3).ControlCount= 1 Tab(3).ControlEnabled= 0 'False Tab(3).Control(0)= "picDelCandidateSkill" Begin VB.PictureBox picEditCandidateSkill Height = 2805 Left = -74940 ScaleHeight = 2745 ScaleWidth = 4935 TabIndex = 45 Top = 360 Width = 4995 Begin VB.TextBox txtEditSkill BackColor = &H00C0C0C0& Height = 285 Left = 1020 Locked = -1 'True TabIndex = 49 Top = 540 Width = 3675 End Begin VB.TextBox txtEditRating Alignment = 1 'Right Justify BackColor = &H00FFFFFF& Height = 285 Left = 1020 MaxLength = 2 MultiLine = -1 'True TabIndex = 48 Top = 1080 Width = 375 End Begin VB.CommandButton cmdEditSave Caption = "Save" Height = 405 Left = 3060 TabIndex = 47 Top = 1650 Width = 1665 End Begin VB.CommandButton cmdEditCancel Caption = "Cancel" Height = 405 Left = 3060 TabIndex = 46 Top = 2100 Width = 1665 End Begin VB.Label Label6 Alignment = 1 'Right Justify Caption = "Skill:" Height = 315 Left = 300 TabIndex = 51 Top = 570 Width = 615 End Begin VB.Label Label5 Alignment = 1 'Right Justify Caption = "Rating:" Height = 315 Left = 300 TabIndex = 50 Top = 1080 Width = 615 End End Begin VB.PictureBox picDelCandidateSkill Height = 2805 Left = -74940 ScaleHeight = 2745 ScaleWidth = 4935 TabIndex = 34 Top = 360 Width = 4995 Begin VB.CommandButton cmdDelCancel Caption = "Cancel" Height = 405 Left = 3060 TabIndex = 38 Top = 2100 Width = 1665 End Begin VB.CommandButton cmdDelDelete Caption = "Delete" Height = 405 Left = 3060 TabIndex = 37 Top = 1650 Width = 1665 End Begin VB.TextBox txtDelRating Alignment = 1 'Right Justify BackColor = &H00C0C0C0& DataField = "Rating" DataSource = "dbaCandidateSkill" Height = 285 Left = 1020 MaxLength = 2 MultiLine = -1 'True TabIndex = 36 Top = 1080 Width = 375 End Begin VB.TextBox txtDelSkill BackColor = &H00C0C0C0& DataField = "Name" DataSource = "dbaCandidateSkill" Height = 285 Left = 1020 TabIndex = 35 Top = 540 Width = 3675 End Begin VB.Label Label8 Alignment = 1 'Right Justify Caption = "Rating:" Height = 315 Left = 300 TabIndex = 40 Top = 1080 Width = 615 End Begin VB.Label Label7 Alignment = 1 'Right Justify Caption = "Skill:" Height = 315 Left = 300 TabIndex = 39 Top = 570 Width = 615 End End Begin VB.PictureBox picAddCandidateSkill Height = 2805 Left = -74940 ScaleHeight = 2745 ScaleWidth = 4935 TabIndex = 28 Top = 360 Width = 4995 Begin VB.TextBox txtAddRating Height = 285 Left = 1020 MultiLine = -1 'True TabIndex = 43 Text = "Main.frx":0370 Top = 1080 Width = 385 End Begin VB.CommandButton cmdAddCancel Caption = "Cancel" Height = 405 Left = 3060 TabIndex = 31 Top = 2100 Width = 1665 End Begin VB.CommandButton cmdAddSave Caption = "Save" Height = 405 Left = 3060 TabIndex = 30 Top = 1650 Width = 1665 End Begin VB.CommandButton cmdAddSaveAndStay Caption = "Save && Sta&y" Height = 405 Left = 3060 TabIndex = 29 Top = 1200 Width = 1665 End Begin MSDBCtls.DBCombo cboAddSkill Bindings = "Main.frx":0374 Height = 315 Left = 1020 TabIndex = 42 Top = 540 Width = 3735 _Version = 65536 _ExtentX = 6588 _ExtentY = 556 _StockProps = 77 ForeColor = 0 BackColor = 16777215 ListField = "Name" BoundColumn = "SkillKey" End Begin VB.Label Label4 Alignment = 1 'Right Justify Caption = "Rating:" Height = 315 Left = 300 TabIndex = 33 Top = 1080 Width = 615 End Begin VB.Label Label3 Alignment = 1 'Right Justify Caption = "Skill:" Height = 315 Left = 300 TabIndex = 32 Top = 570 Width = 615 End End Begin VB.PictureBox picListCandidateSkill Height = 2805 Left = 60 ScaleHeight = 2745 ScaleWidth = 4935 TabIndex = 27 Top = 360 Width = 4995 Begin MSDBCtls.DBList lstCandidateSkill Bindings = "Main.frx":0386 Height = 2535 Left = 30 TabIndex = 53 Top = 120 Width = 4875 _Version = 65536 _ExtentX = 8599 _ExtentY = 4471 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 BeginProperty Font {FB8F0823-0164-101B-84ED-08002B2EC713} name = "Courier New" charset = 0 weight = 400 size = 9 underline = 0 'False italic = 0 'False strikethrough = 0 'False EndProperty ListField = "Combined" BoundColumn = "CandidateSkillsKey" End End End End Begin VB.Label lblPhone Caption = "Phone" Height = 255 Left = 6390 TabIndex = 21 Top = 3870 Width = 615 End Begin VB.Label lblLastName Caption = "Last Name" Height = 255 Left = 3420 TabIndex = 20 Top = 3870 Width = 855 End Begin VB.Label lblInitial Caption = "Initial" Height = 255 Left = 2940 TabIndex = 19 Top = 3870 Width = 495 End Begin VB.Label lblFirstName Caption = "First Name" Height = 255 Left = 780 TabIndex = 18 Top = 3870 Width = 855 End Begin VB.Label lblTitle Caption = "Title" Height = 255 Left = 60 TabIndex = 17 Top = 3870 Width = 615 End End End End Begin VB.Frame fmeTeam Height = 5385 Left = 90 TabIndex = 5 Top = 30 Width = 8265 Begin VB.CommandButton cmdDoIt Caption = "Select &Best Team" Enabled = 0 'False Height = 375 Left = 6210 TabIndex = 6 Top = 240 Width = 1935 End Begin MSDBCtls.DBList lstTeams Bindings = "Main.frx":03A0 Height = 4470 Left = 120 TabIndex = 79 Top = 720 Width = 8025 _Version = 65536 _ExtentX = 14155 _ExtentY = 7885 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 BeginProperty Font {FB8F0823-0164-101B-84ED-08002B2EC713} name = "Courier New" charset = 0 weight = 400 size = 8.25 underline = 0 'False italic = 0 'False strikethrough = 0 'False EndProperty ListField = "Combined" BoundColumn = "Combined" End Begin VB.Label Label1 Caption = "&Project:" Height = 225 Left = 150 TabIndex = 23 Top = 330 Width = 585 End Begin MSDBCtls.DBCombo cboProjectTeam Bindings = "Main.frx":03BC Height = 315 Left = 810 TabIndex = 22 Top = 270 Width = 3345 _Version = 65536 _ExtentX = 5900 _ExtentY = 556 _StockProps = 77 ForeColor = 0 BackColor = 16777215 ListField = "Name" BoundColumn = "ProjectKey" End End Begin VB.Frame fmeSkills Height = 5385 Left = -74910 TabIndex = 4 Top = 30 Width = 8265 Begin VB.CommandButton cmdDeleteSkill Caption = "Delete" Height = 495 Left = 5370 TabIndex = 58 Top = 2970 Width = 1485 End Begin VB.CommandButton cmdEditSkill Caption = "Ed&it" Height = 495 Left = 5370 TabIndex = 57 Top = 2400 Width = 1485 End Begin VB.CommandButton cmdAddSkill Caption = "&Add" Height = 495 Left = 5370 TabIndex = 56 Top = 1830 Width = 1485 End Begin MSDBCtls.DBList lstSkills Bindings = "Main.frx":03CF Height = 4155 Left = 1830 TabIndex = 55 Top = 690 Width = 3015 _Version = 65536 _ExtentX = 5318 _ExtentY = 7329 _StockProps = 77 ForeColor = -2147483640 BackColor = 12632256 ListField = "Name" BoundColumn = "SkillKey" End End Begin MSDBGrid.DBGrid DBGrid3 Bindings = "Main.frx":03E1 Height = 3735 Left = -74280 OleObjectBlob = "Main.frx":03F3 TabIndex = 3 Top = 480 Width = 6255 End Begin MSDBGrid.DBGrid DBGrid2 Bindings = "Main.frx":0B1D Height = 3855 Left = -74280 OleObjectBlob = "Main.frx":0B2F TabIndex = 2 Top = 480 Width = 6375 End Begin MSDBGrid.DBGrid grdTitles Height = 4215 Left = -73560 OleObjectBlob = "Main.frx":1259 TabIndex = 1 Top = 360 Width = 5175 End End Begin VB.Menu file Caption = "&File" Begin VB.Menu fileNew Caption = "&New..." End Begin VB.Menu fileOpen Caption = "&Open..." End Begin VB.Menu filedash1 Caption = "-" End Begin VB.Menu fileExit Caption = "E&xit" End End Begin VB.Menu edit Caption = "&Edit" Begin VB.Menu editCut Caption = "Cu&t" End Begin VB.Menu editCopy Caption = "&Copy" End Begin VB.Menu editPaste Caption = "&Paste" End Begin VB.Menu editdash1 Caption = "-" End Begin VB.Menu editProperties Caption = "Proper&ties..." End End Begin VB.Menu help Caption = "&Help" Begin VB.Menu helpAbout Caption = "&About..." End End Attribute VB_Name = "frmMain" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Dim ThisForm As Object Dim frmMain_Loading As Boolean Public Function formatMainForm() As Integer Dim s 'Set the titlebar to the database title. frmMain.Caption = gProgramTitle s = SQLResultStr(gMainDB, "Subject", "tblAboutDatabase", "") If Len(s) > 0 Then frmMain.Caption = frmMain.Caption + " - " + s End If 'Setup/Remove the picture box. s = SQLResultStr(gMainDB, "ShowPictures", "tblAboutDatabase", "") If s Then pctPicture.Visible = True chkAvailable.TOP = 3150 Else pctPicture.Visible = False chkAvailable.TOP = 2000 End If formatMainForm = 0 End Function Function validateEditCandidateSkill() As Boolean Dim okay As Boolean okay = True If Val(txtEditRating) < 1 Or Val(txtEditRating) > 10 Then MsgBox "Valid rating values are from 1 to 10. The best rating is 10, the worst is 1.", 64, gProgramTitle txtEditRating.SetFocus okay = False End If validateEditCandidateSkill = okay End Function Function validateAddCandidateSkill() As Boolean Dim okay As Boolean okay = True If IsNull(txtCandidateKey) Or txtCandidateKey = -1 Then okay = False MsgBox "No candidate exists.", 48, gProgramTitle Exit Function End If If Val(txtAddRating) < 1 Or Val(txtAddRating) > 10 Then MsgBox "Valid rating values are from 1 to 10. The best rating is 10, the worst is 1.", 64, gProgramTitle txtAddRating.SetFocus okay = False Else If Len(Trim$(cboAddSkill.TEXT)) < 1 Then MsgBox "You need to select a skill.", 64, gProgramTitle cboAddSkill.SetFocus okay = False Else If Len(Trim$(SQLResultStr(gMainDB, "SkillKey", "tblCandidateSkill", "CandidateKey=" + txtCandidateKey + " and SkillKey=" + cboAddSkill.BoundText))) > 0 Then MsgBox "This candidate already has the selected skill.", 64, gProgramTitle cboAddSkill.SetFocus okay = False End If End If End If validateAddCandidateSkill = okay End Function Private Sub cboProjectTeam_Click(Area As Integer) If Len(Trim(cboProjectTeam.BoundText)) > 0 Then 'Populate the grid. dbaCandidateProject.RecordSource = "Select * From qryCandidateProject Where ProjectKey=" + cboProjectTeam.BoundText cmdDoIt.Enabled = True Else 'Clear the grid. dbaCandidateProject.RecordSource = "Select * From qryCandidateProject Where ProjectKey = -1" cmdDoIt.Enabled = False End If dbaCandidateProject.Refresh End Sub Private Sub cmdAddCancel_Click() dbaCandidateSkill.Refresh tabCandidateSkill.Tab = 0 End Sub Private Sub cmdAddCandidate_Click() gAction = 1 MousePointer = 11 frmAddCandidate.Show 1 dbaCandidate.Refresh End Sub Private Sub cmdAddJobProject_Click() If Len(Trim(lstProject)) > 0 Then MousePointer = 11 gAction = 1 gProjectKey = lstProject.BoundText frmAddJobProject.Show 1 dbaJobProject.Refresh Else MsgBox "Please select a project first.", 64, gProgramTitle End If End Sub Private Sub cmdAddJobSkills_Click() If Len(Trim(lstJobtitles)) > 0 Then MousePointer = 11 gAction = 1 gJobtitleKey = lstJobtitles.BoundText frmAddJobSkill.Show 1 dbaSkillJob.Refresh Else MsgBox "Please select a title first.", 64, gProgramTitle End If End Sub Private Sub cmdAddProject_Click() gAction = 1 gJobtitleKey = -1 MousePointer = 11 frmAddProject.Show 1 dbaProject.Refresh End Sub Private Sub cmdAddSave_Click() Dim okay As Boolean okay = validateAddCandidateSkill() If okay Then 'Okay to save the record. dbaCandidateSkill.Recordset.AddNew dbaCandidateSkill.Recordset![CandidateKey] = txtCandidateKey dbaCandidateSkill.Recordset![SkillKey] = cboAddSkill.BoundText dbaCandidateSkill.Recordset![Rating] = txtAddRating dbaCandidateSkill.Recordset.UPDATE tabCandidateSkill.Tab = 0 End If End Sub Private Sub cmdAddSaveAndStay_Click() Dim okay As Boolean okay = validateAddCandidateSkill() If okay Then 'Okay to save the record. dbaCandidateSkill.Recordset.AddNew dbaCandidateSkill.Recordset![CandidateKey] = txtCandidateKey dbaCandidateSkill.Recordset![SkillKey] = cboAddSkill.BoundText dbaCandidateSkill.Recordset![Rating] = txtAddRating dbaCandidateSkill.Recordset.UPDATE dbaCandidateSkill.Recordset.AddNew End If End Sub Private Sub cmdAddSkill_Click() gAction = 1 gSkillKey = -1 MousePointer = 11 frmAddSkill.Show 1 dbaSkills.Refresh End Sub Private Sub cmdAddTitle_Click() gAction = 1 gJobtitleKey = -1 MousePointer = 11 frmAddJobtitle.Show 1 dbaJobtitle.Refresh End Sub Private Sub cmdDelCancel_Click() tabCandidateSkill.Tab = 0 dbaCandidateSkill.UpdateControls End Sub Private Sub cmdDelCandidate_Click() Dim SQL 'Delete records of candidate skills. SQL = "DELETE * FROM tblCandidateSkill WHERE CandidateKey=" + txtCandidateKey gMainDB.Execute SQL, dbFailOnError 'Delete the Candidate. SQL = "DELETE * FROM tblCandidate WHERE CandidateKey=" + txtCandidateKey gMainDB.Execute SQL, dbFailOnError dbaCandidate.Refresh End Sub Private Sub cmdDelDelete_Click() dbaCandidateSkill.Recordset.DELETE tabCandidateSkill.Tab = 0 End Sub Private Sub cmdDeleteSkill_Click() If Len(Trim(lstSkills)) > 0 Then 'Do not delete if in use. If Len(Trim$(SQLResultStr(gMainDB, "SkillKey", "tblCandidateSkill", "SkillKey=" + lstSkills.BoundText))) > 0 Then MsgBox "This skill cannot be deleted because it is attributed to a candidate.", 64, gProgramTitle Exit Sub End If If Len(Trim$(SQLResultStr(gMainDB, "SkillKey", "tblSkillJob", "SkillKey=" + lstSkills.BoundText))) > 0 Then MsgBox "This skill cannot be deleted because it is attributed to a title.", 64, gProgramTitle Exit Sub End If 'Delete the record. dbaSkills.Recordset.FindFirst "SkillKey=" + lstSkills.BoundText dbaSkills.Recordset.DELETE dbaSkills.Refresh Else MsgBox "Please select a skill first.", 64, gProgramTitle End If End Sub Private Sub cmdDelJobProject_Click() If Len(Trim(lstJobProject.BoundText)) > 0 Then 'Delete the record. dbaJobProject.Recordset.FindFirst "JobProjectKey=" + lstJobProject.BoundText dbaJobProject.Recordset.DELETE dbaJobProject.Refresh Else MsgBox "You must select a title first.", 64, gProgramTitle End If End Sub Private Sub cmdDelJobSkills_Click() If Len(Trim(lstSkillJob.BoundText)) > 0 Then 'Delete the record. dbaSkillJob.Recordset.FindFirst "SkillJobKey=" + lstSkillJob.BoundText dbaSkillJob.Recordset.DELETE dbaSkillJob.Refresh Else MsgBox "You must select a skill first.", 64, gProgramTitle End If End Sub Private Sub cmdDelProject_Click() Dim SQL If Len(Trim(lstProject)) > 0 Then 'Delete the titles of the project first. SQL = "DELETE * FROM tblJobProject WHERE ProjectKey=" + lstProject.BoundText gMainDB.Execute SQL, dbFailOnError 'Delete the Project. SQL = "DELETE * FROM tblProject WHERE ProjectKey=" + lstProject.BoundText gMainDB.Execute SQL, dbFailOnError dbaProject.Refresh Else MsgBox "You must highlight a project first.", 64, gProgramTitle End If End Sub Private Sub cmdDelTitle_Click() Dim SQL If Len(Trim(lstJobtitles)) > 0 Then 'Do not delete if in use. If Len(Trim$(SQLResultStr(gMainDB, "JobtitleKey", "tblJobProject", "JobtitleKey=" + lstJobtitles.BoundText))) > 0 Then MsgBox "This title cannot be deleted because it is attributed to a project.", 64, gProgramTitle Exit Sub End If 'Delete the skills of the Jobtitle first. SQL = "DELETE * FROM tblSkillJob WHERE JobtitleKey=" + lstJobtitles.BoundText gMainDB.Execute SQL, dbFailOnError 'Delete the Jobtitle. SQL = "DELETE * FROM tblJobtitle WHERE JobtitleKey=" + lstJobtitles.BoundText gMainDB.Execute SQL, dbFailOnError dbaJobtitle.Refresh Else MsgBox "You must select a title first.", 64, gProgramTitle End If End Sub Private Sub cmdDoIt_Click() Dim SQL$, res% Dim msg, style MousePointer = 11 'Initialize some global "constants" EmpsInPool = SQLResultCount(gMainDB, "tblCandidate", "[Available] = -1") JobsInProject = SQLResultCount(gMainDB, "tblJobProject", "[ProjectKey] = " + cboProjectTeam.BoundText) 'Quick sanity check. If JobsInProject > EmpsInPool Then MousePointer = 0 MsgBox "Cannot continue. There aren't enough available employees to fill all the jobs in the project. Make more employees available or reduce the number of jobs in the project.", 64, gProgramTitle Exit Sub End If 'Make sure this is what the user wants to do! MousePointer = 0 msg = "Delete current team and look for a new one?" style = vbYesNo + vbQuestion + vbDefaultButton2 ' Define buttons. res% = MsgBox(msg, style, gProgramTitle) If res% = vbNo Then ' User chose NO. Exit Sub End If MousePointer = 11 'Nuke the current team table. SQL$ = "DELETE FROM tblCandidateProject where ProjectKey<>-999" gMainDB.Execute SQL, dbFailOnError lstTeams.Refresh 'Get the show on the road. cboProjectTeam.SetFocus cboProjectTeam.Refresh frmSettings.Show 1 'User can do damage if not modal. End Sub Private Sub cmdEditCancel_Click() dbaCandidateSkill.UpdateControls tabCandidateSkill.Tab = 0 End Sub Private Sub cmdEditProject_Click() gAction = 2 gProjectKey = lstProject.BoundText If Not IsNull(lstProject) And Len(Trim$(lstProject)) > 0 Then MousePointer = 11 frmAddProject.Show 1 dbaProject.Refresh Else MsgBox "No project is selected to be edited.", 64, gProgramTitle End If End Sub Private Sub cmdEditSave_Click() Dim okay As Boolean okay = validateEditCandidateSkill() If okay Then 'Okay to save the record. dbaCandidateSkill.Recordset.Edit dbaCandidateSkill.Recordset![Rating] = txtEditRating dbaCandidateSkill.Recordset.UPDATE tabCandidateSkill.Tab = 0 End If End Sub Private Sub cmdEditSkill_Click() gAction = 2 gSkillKey = lstSkills.BoundText If Not IsNull(lstSkills) And Len(Trim$(lstSkills)) > 0 Then MousePointer = 11 frmAddSkill.Show 1 dbaSkills.Refresh Else MsgBox "No skill is selected to be edited.", 64, gProgramTitle End If End Sub Private Sub cmdEditTitle_Click() gAction = 2 gJobtitleKey = lstJobtitles.BoundText If Not IsNull(lstJobtitles) And Len(Trim$(lstJobtitles)) > 0 Then MousePointer = 11 frmAddJobtitle.Show 1 dbaJobtitle.Refresh Else MsgBox "No title is selected to be edited.", 64, gProgramTitle End If End Sub Private Sub dbaCandidate_Reposition() lstCandidate.BoundText = txtCandidateKey End Sub Private Sub fileExit_Click() End End Sub Private Sub fileNew_Click() MousePointer = 11 frmCreateDB.Show 1 End Sub Private Sub fileOpen_Click() Dim r%, gn$ CMDialog1.Filter = "BTS Database|*.MDB" CMDialog1.FilterIndex = 1 CMDialog1.filename = "" CMDialog1.CancelError = True On Error Resume Next Err = 0 CMDialog1.Action = 1 gn$ = UCase$(Trim$(CMDialog1.filename)) If Err = 0 And gn$ > "" And (InStr(gn$, "*") = 0) And (InStr(gn$, "?") = 0) Then 'Load the selected database. If Not SetDatabase(gn$) Then Beep MsgBox "Fatal Error: cannot open " + gn$ + ". You may be missing files.", 16, gProgramTitle End End If r = formatMainForm() End If End Sub Private Sub Form_Activate() Dim r, SQL$ r = formatMainForm() MousePointer = 0 If frmMain_Loading Then frmMain_Loading = False 'Nuke the current team table. SQL$ = "DELETE FROM tblCandidateProject where ProjectKey<>-999" gMainDB.Execute SQL, dbFailOnError Unload frmSplash End If End Sub Private Sub editCopy_Click() Clipboard.Clear If TypeOf Screen.ActiveControl Is TextBox Then Clipboard.SetText Screen.ActiveControl.SelText ElseIf TypeOf Screen.ActiveControl Is ComboBox Then Clipboard.SetText Screen.ActiveControl.TEXT ElseIf TypeOf Screen.ActiveControl Is PictureBox Then Clipboard.SetData Screen.ActiveControl.picture ElseIf TypeOf Screen.ActiveControl Is ListBox Then Clipboard.SetText Screen.ActiveControl.TEXT Else ' No action makes sense for the other controls. End If End Sub Private Sub editCut_Click() ' First do the same as a copy. editCopy_Click ' Now clear contents of active control. If TypeOf Screen.ActiveControl Is TextBox Then Screen.ActiveControl.SelText = "" ElseIf TypeOf Screen.ActiveControl Is ComboBox Then Screen.ActiveControl.TEXT = "" ElseIf TypeOf Screen.ActiveControl Is PictureBox Then Screen.ActiveControl.picture = LoadPicture() ElseIf TypeOf Screen.ActiveControl Is ListBox Then Screen.ActiveControl.RemoveItem Screen.ActiveControl.ListIndex Else ' No action makes sense for the other controls. End If End Sub Private Sub editPaste_Click() If TypeOf Screen.ActiveControl Is TextBox Then Screen.ActiveControl.SelText = Clipboard.GetText() ElseIf TypeOf Screen.ActiveControl Is ComboBox Then Screen.ActiveControl.TEXT = Clipboard.GetText() ElseIf TypeOf Screen.ActiveControl Is PictureBox Then Screen.ActiveControl.picture = Clipboard.GetData() ElseIf TypeOf Screen.ActiveControl Is ListBox Then Screen.ActiveControl.AddItem Clipboard.GetText() Else ' No action makes sense for the other controls. End If End Sub Private Sub Form_Initialize() Dim r Left = (Screen.Width - Width) / 2 TOP = (Screen.Height - Height) / 2 frmMain_Loading = True 'Flag for the activate. 'Load the default database. If Not SetDatabase(App.Path + "\MAKETEAM.MDB") Then Beep MsgBox "Fatal Error: Cannot find the default database. You may be missing files.", 16, gProgramTitle End End If 'Set some configuration items. gDefaultRating = 5 Set ThisForm = Me End Sub '--------------------------------------------------------- 'Open the selected database. Returns FALSE if error. '--------------------------------------------------------- Public Function SetDatabase(AP As String) As Boolean On Error GoTo SetDatabase_SomethingBad 'Open main database. gMainDBName = AP Set gMainDB = Workspaces(0).OpenDatabase(gMainDBName) 'Adjust the data controls to proper path. dbaCandidate.DatabaseName = gMainDBName dbaCandidateSkill.DatabaseName = gMainDBName dbaSkills.DatabaseName = gMainDBName dbaJobProject.DatabaseName = gMainDBName dbaProject.DatabaseName = gMainDBName dbaJobtitle.DatabaseName = gMainDBName dbaCandidateProject.DatabaseName = gMainDBName dbaSkillJob.DatabaseName = gMainDBName 'Refresh all the controls. dbaCandidate.Refresh dbaCandidateSkill.Refresh dbaSkills.Refresh dbaJobProject.Refresh dbaProject.Refresh dbaJobtitle.Refresh dbaCandidateProject.Refresh dbaSkillJob.Refresh SetDatabase = True 'Successful. Exit Function SetDatabase_SomethingBad: SetDatabase = False 'Unsuccessful. End Function Private Sub frmSkillsOfTitle_DragDrop(Source As Control, X As Single, Y As Single) End Sub Private Sub helpAbout_Click() frmAbout.Show 1 End Sub Private Sub lstCandidate_Click() tabCandidates.Tab = 0 tabCandidates_Click 0 End Sub Private Sub lstJobtitles_Click() Dim thekey thekey = lstJobtitles.BoundText If Not IsNull(thekey) And Len(Trim$(thekey)) > 0 Then dbaJobtitle.Recordset.FindFirst "JobtitleKey=" + Str$(thekey) End If End Sub Private Sub lstProject_Click() Dim thekey thekey = lstProject.BoundText If Not IsNull(thekey) And Len(Trim$(thekey)) > 0 Then dbaProject.Recordset.FindFirst "ProjectKey=" + Str$(thekey) End If End Sub Private Sub pctPicture_Change() If pctPicture = Null Then lblNoPicture.Visible = True Else lblNoPicture.Visible = False End If End Sub Private Sub editProperties_Click() Dim r As Integer MousePointer = 11 frmDBProperties.Show 1 r = formatMainForm() End Sub Private Sub tabCandidates_Click(PreviousTab As Integer) Dim thekey thekey = lstCandidate.BoundText Select Case tabCandidates.Tab Case 0 'Detail Tab Page If PreviousTab = 1 Then 'We were on the summary screen. 'Get the current record. If Not IsNull(thekey) And Len(Trim$(thekey)) > 0 Then dbaCandidate.Recordset.FindFirst "CandidateKey=" + Str$(thekey) End If End If Case 1 'Summary Tab Page 'Update summary screen. dbaCandidate.Recordset.Edit dbaCandidate.Recordset.UPDATE 'Record dbaCandidate.Recordset.Requery End Select End Sub Private Sub tabCandidateSkill_Click(PreviousTab As Integer) Dim thekey thekey = lstCandidateSkill.BoundText Select Case tabCandidateSkill.Tab Case 0 'List If Len(CStr(txtCandidateKey)) > 0 Then If txtCandidateKey > -1 Then 'Flag that no candidate is selected. 'We have a candidate so list his/her skills. On Error Resume Next dbaCandidateSkill.RecordSource = "Select * From qryCandidateSkillRating Where CandidateKey=" + txtCandidateKey dbaCandidateSkill.Recordset.Requery dbaCandidateSkill.UpdateControls lstCandidateSkill.Refresh 'Due to Beta6 trouble. dbaCandidateSkill.Refresh 'Due to Beta6 trouble. End If End If Case 1 'Add 'Add cboAddSkill = "" txtAddRating = gDefaultRating Case 2 'Edit 'Get the current record. If IsNull(thekey) Or Len(Trim$(thekey)) < 1 Then MsgBox "No candidate skill is selected.", 64, gProgramTitle tabCandidateSkill.Tab = 0 Else dbaCandidateSkill.Recordset.FindFirst "CandidateSkillsKey=" + Str$(thekey) txtEditSkill = dbaCandidateSkill.Recordset![Name] txtEditRating = dbaCandidateSkill.Recordset![Rating] End If Case 3 'Delete If IsNull(thekey) Or Len(Trim$(thekey)) < 1 Then MsgBox "No candidate skill is selected.", 64, gProgramTitle tabCandidateSkill.Tab = 0 Else dbaCandidateSkill.Recordset.FindFirst "CandidateSkillsKey=" + Str$(thekey) End If End Select End Sub Private Sub tabMain_Click(PreviousTab As Integer) If PreviousTab = 0 Then 'Save the displayed record in case changed. dbaCandidate.Recordset.Edit dbaCandidate.Recordset.UPDATE End If End Sub Private Sub txtCandidateKey_Change() tabCandidateSkill.Tab = 0 tabCandidateSkill_Click 0 End Sub Private Sub txtJobtitleKey_Change() If txtJobtitleKey > -1 Then If Len(Trim(lstJobtitles)) > 0 Then 'Show skills for the selected title. dbaSkillJob.RecordSource = "Select * From qrySkillJob where JobtitleKey=" + lstJobtitles.BoundText Else 'Blank out the list. dbaSkillJob.RecordSource = "Select * From qrySkillJob where JobtitleKey=-999" End If dbaSkillJob.Refresh End If End Sub Private Sub txtProjectKey_Change() If Len(CStr(txtProjectKey)) > 0 Then 'Empty case. If txtProjectKey > -1 Then If Len(Trim(lstProject)) > 0 Then 'Show skills for the selected title. dbaJobProject.RecordSource = "select * from qryJobProject where ProjectKey=" + lstProject.BoundText dbaJobProject.Refresh Exit Sub End If End If End If 'Blank out the list. dbaJobProject.RecordSource = "select * from qryJobProject where ProjectKey=-999" dbaJobProject.Refresh End Sub