home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmAddJobSkill
- BorderStyle = 3 'Fixed Dialog
- Caption = "Add Skills to Title"
- ClientHeight = 3630
- ClientLeft = 2655
- ClientTop = 2955
- ClientWidth = 6585
- ControlBox = 0 'False
- Height = 4035
- Left = 2595
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3630
- ScaleWidth = 6585
- ShowInTaskbar = 0 'False
- Top = 2610
- Width = 6705
- Begin VB.CommandButton cmdSelect
- Caption = "&Select"
- Height = 465
- Left = 5130
- TabIndex = 3
- Top = 90
- Width = 1245
- End
- Begin VB.Data dbaSkillJob
- Caption = "dbaSkillJob"
- Connect = "Access"
- DatabaseName = "maketeam"
- Exclusive = 0 'False
- Height = 300
- Left = 0
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "tblSkillJob"
- Top = 3330
- Visible = 0 'False
- Width = 2115
- End
- Begin VB.TextBox Text1
- BackColor = &H00808080&
- DataSource = "&H00808080&"
- Height = 1485
- Left = 5130
- Locked = -1 'True
- MultiLine = -1 'True
- TabIndex = 2
- TabStop = 0 'False
- Text = "AddJobSk.frx":0000
- Top = 1980
- Width = 1245
- End
- Begin VB.CommandButton cmdSave
- Caption = "&OK"
- Height = 465
- Left = 5130
- TabIndex = 0
- Top = 600
- Width = 1245
- End
- Begin VB.Data dbaSkill
- Caption = "Skill"
- Connect = "Access"
- DatabaseName = "maketeam"
- Exclusive = 0 'False
- Height = 300
- Left = 2700
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "qrySkill"
- Top = 3330
- Visible = 0 'False
- Width = 1695
- End
- Begin MSDBCtls.DBList lstSkills
- Bindings = "AddJobSk.frx":0073
- Height = 3375
- Left = 870
- TabIndex = 1
- Top = 90
- Width = 3915
- _Version = 65536
- _ExtentX = 6906
- _ExtentY = 5953
- _StockProps = 77
- ForeColor = -2147483640
- BackColor = 12632256
- ListField = "Name"
- BoundColumn = "SkillKey"
- End
- Attribute VB_Name = "frmAddJobSkill"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim SkillsAdded As Integer
- Sub AddASkill()
- If Len(Trim(lstSkills)) > 0 Then
- If Len(Trim$(SQLResultStr(gMainDB, "SkillKey", "tblSkillJob", _
- "SkillKey=" + lstSkills.BoundText + " and " + _
- "JobtitleKey=" + gJobtitleKey))) > 0 Then
- MsgBox "This skill is already attributed to the selected title.", 64, gProgramTitle
- Else
- dbaSkillJob.Recordset.AddNew
- dbaSkillJob.Recordset![JobtitleKey] = gJobtitleKey
- dbaSkillJob.Recordset![SkillKey] = lstSkills.BoundText
- dbaSkillJob.Recordset.UPDATE
- End If
- SkillsAdded = SkillsAdded + 1 'Put screen updates here if you want to see status.
- Else
- MsgBox "Please highlight a skill before trying to add it.", 64, gProgramTitle
- End If
- End Sub
- Private Sub cmdCancel_Click()
- gAction = -1
- Unload frmAddJobSkill
- End Sub
- Private Sub cmdSave_Click()
- gAction = 0
- Unload frmAddJobSkill
- End Sub
- Private Sub cmdSelect_Click()
- AddASkill
- End Sub
- Private Sub Form_Load()
- Left = (Screen.Width - Width) / 2
- TOP = (Screen.Height - Height) / 2
- MousePointer = 0
- SkillsAdded = 0
- dbaSkill.DatabaseName = gMainDBName
- dbaSkill.Refresh
- dbaSkillJob.DatabaseName = gMainDBName
- dbaSkillJob.Refresh
- frmAddJobSkill.Caption = "Add New Skill to Title"
- End Sub
- Private Sub lstSkills_DblClick()
- AddASkill
- End Sub
-