I currently have a set of data describing skillsets for call center agents which is arranged as follows:
Name Skillset
Joe Blow Skill_A
Joe Blow Skill_B
Joe Blow Skill_C
Jane Doe Skill_C
Jane Doe Skill_D
The user needs it converted to this format in order to bulk load it into another application:
Name Skillset1 Skillset2 Skillset3 Skillset4...
Joe Blow Skill_A Skill_B Skill_C
Jane Doe Skill_C Skill_D
I'm attempting to loop through the recordset and use the .AddNew method to create the record and populate it with the agent name, ID, location etc. Then I'm using the .Update method to add each skill set record associated with the current agent to subsequent Skillset columns in the converted table. However, since the "Skillset" fields (10 of them) will all have similar names (Skillsetn) I need to know how to refer to the field name generically for the Update. I can't seem to figure that part out .
The following snip of code isn't working for me:
I'm clueless and haven't been able to find anything in Help on how to approach it.
Hope this makes sense. Thanks in advance.
Name Skillset
Joe Blow Skill_A
Joe Blow Skill_B
Joe Blow Skill_C
Jane Doe Skill_C
Jane Doe Skill_D
The user needs it converted to this format in order to bulk load it into another application:
Name Skillset1 Skillset2 Skillset3 Skillset4...
Joe Blow Skill_A Skill_B Skill_C
Jane Doe Skill_C Skill_D
I'm attempting to loop through the recordset and use the .AddNew method to create the record and populate it with the agent name, ID, location etc. Then I'm using the .Update method to add each skill set record associated with the current agent to subsequent Skillset columns in the converted table. However, since the "Skillset" fields (10 of them) will all have similar names (Skillsetn) I need to know how to refer to the field name generically for the Update. I can't seem to figure that part out .
The following snip of code isn't working for me:
Code:
Do While i <= 10
i = i + 1
Set rsConvSkillSets = db.openrecordset("SELECT * FROM tblConvertedAgentSkills WHERE SymposiumAgentID = '" & strAgtID & "';", dbopendynaset)
strTmpSkill = "Skillset" & Str(i)
Set fldSkill = strTmpSkill ' THIS IS WHAT I'M DOING WRONG I THINK!
With rsConvSkillSets
.Edit
!fldSkill.Value = strImpSkillSet ' THIS PROBABLY ISN'T RIGHT EITHER!
.Update
End With
Loop
I'm clueless and haven't been able to find anything in Help on how to approach it.
Hope this makes sense. Thanks in advance.