I am a beginner and I am trying to write a rather complicated loop. The background is... I am trying to write VB code that loops through unassigned jobs and based on the Job Type, it assigns the job to an intern that can do the Job Type.
I have a table called "JobTickets" that has one of its fields called "JobType". Some examples of the job types are Server Issues and Software Installation. Another field of the "JobTickets" table is "AssignedTo" which will have the name of the intern assigned to the job. I have another table that is called "InternSkills" that has the interns listed with the columns being each of the possible job types(Server Issues, Software Installation, etc.). In each job type column there is a yes if the intern can complete the task.
So what I want the loop to do is take the first job and loop through each intern until it finds an intern that can do that job type. Once it finds an intern that can do that job type, I would like the intern's name to be placed into a column called "AssignedTo" that is in the "JobTickets" table.
The looping in English that I came up with is...
Loop Through JobTickets Table
If AssignedTo field in JobTicket tabble is Empty Then
Take Take the JobType and loop through InternSkills till that JobType has a yes.
Then take that name of the intern and copy it into the AssignedTo field of the JobTickets table
Hopefully this makes sense and is feasible. I want to thank you in advance for any help that you provide. It is greatly appreciated.
I have a table called "JobTickets" that has one of its fields called "JobType". Some examples of the job types are Server Issues and Software Installation. Another field of the "JobTickets" table is "AssignedTo" which will have the name of the intern assigned to the job. I have another table that is called "InternSkills" that has the interns listed with the columns being each of the possible job types(Server Issues, Software Installation, etc.). In each job type column there is a yes if the intern can complete the task.
So what I want the loop to do is take the first job and loop through each intern until it finds an intern that can do that job type. Once it finds an intern that can do that job type, I would like the intern's name to be placed into a column called "AssignedTo" that is in the "JobTickets" table.
The looping in English that I came up with is...
Loop Through JobTickets Table
If AssignedTo field in JobTicket tabble is Empty Then
Take Take the JobType and loop through InternSkills till that JobType has a yes.
Then take that name of the intern and copy it into the AssignedTo field of the JobTickets table
Hopefully this makes sense and is feasible. I want to thank you in advance for any help that you provide. It is greatly appreciated.