Here is my problem.
I have a table called "tblemplInfo" with the following fields:
Employee ID
Name
001
002
003
004
005
.
.
.
099
All of the fields with a number name are Yes/No fields. What I want to do is search each record in the table and each time there is a "yes" or check in the Yes/No field, I want to move the following information to a table called "tblJCinfo":
Employee ID into a field called Employee ID
Name into a field called Name
the name of the field with the "Yes" value into a field called Job Code
Example:
If the first record in tblEmplInfo is:
Employee ID: 12345
Name: John Doe
001: Yes
002: No
003: No
004: Yes
005: No
.
.
.
099: No
Then the following information would be the first record moved into tblJCinfo:
Employee ID: 12345
Name: John Doe
Job Code: 001
The second record moved into tblJCinfo would be:
Employee ID: 12345
Name: John Doe
Job Code: 004
I am assuming that this will have to be done in a module, and it would be ideal if the code would loop through all of the records in tblEmplInfo.
Thanks for the help!
I have a table called "tblemplInfo" with the following fields:
Employee ID
Name
001
002
003
004
005
.
.
.
099
All of the fields with a number name are Yes/No fields. What I want to do is search each record in the table and each time there is a "yes" or check in the Yes/No field, I want to move the following information to a table called "tblJCinfo":
Employee ID into a field called Employee ID
Name into a field called Name
the name of the field with the "Yes" value into a field called Job Code
Example:
If the first record in tblEmplInfo is:
Employee ID: 12345
Name: John Doe
001: Yes
002: No
003: No
004: Yes
005: No
.
.
.
099: No
Then the following information would be the first record moved into tblJCinfo:
Employee ID: 12345
Name: John Doe
Job Code: 001
The second record moved into tblJCinfo would be:
Employee ID: 12345
Name: John Doe
Job Code: 004
I am assuming that this will have to be done in a module, and it would be ideal if the code would loop through all of the records in tblEmplInfo.
Thanks for the help!