
December 11th, 2006, 01:41 PM
|
|
Registered User
|
|
Join Date: Nov 2006
Location: Connecticut
Posts: 25
Time spent in forums: 5 h 48 m 23 sec
Reputation Power: 0
|
|
|
A quick tweek to existing code
Hey all. I have a listbox where I select a skill and then move it to an individuals HR record with a button. Currently, EmployeeID and SkillID (numbers) move over and populate the employees record in the EmployeeSkills table. When this was coded, I forgot to ask to have a 3d column moved over as well called SkillName (which is text). What do I need to add to the code below to accomplish this? Thanks
Private Sub AddSkillToCandidate_Click()
Dim sqlstr As String
Dim intCurrentRow As Integer
sqlstr = "Insert into employeeSkills (contactID, SkillID) Values (" + CStr(ContactID) + ","
For intCurrentRow = 0 To SkillsInventory.ListCount - 1
If SkillsInventory.Selected(intCurrentRow) Then
MsgBox (sqlstr + SkillsInventory.Column(0, intCurrentRow)) + ")"
CurrentDb.Execute (sqlstr + CStr(SkillsInventory.Column(0, intCurrentRow))) + ")"
End If
Next intCurrentRow
EmployeeSkillsSubform.Requery
End Sub
|