Stangleboy
Programmer
I have been out of the VBA scene for a long time and this seems easy but I have been searching the FAQ and other posts since 8:00 am and have not found code that can help me. Any help would be appreciated.
I want to populate a field in a table from the data entered into another field in the same table. I need to assign a value to an employee based on the last digit (5 characters) of their employee number. The table that the data is assigned to is dbo.Employee and the field is “EmpNumber” and the value needs to populate the same table but the field is “EmpGroup”. Would I use an IF function or DLookup:
Any employee number ending with 1, 2 or 3 should be assigned a “1” in EmpGroup field.
Any employee number ending with 4, 5 or 6 should be assigned a “2” in EmpGroup field.
Any employee number ending with 7, 8, 9 or 0 should be assigned a “3” in EmpGroup field.
If you know a FAQ or post that you can refer me to that looks at the last character in the EmpNumber field and then groups the character to the right number that would be great. Thank you in advance for your assistance.
I want to populate a field in a table from the data entered into another field in the same table. I need to assign a value to an employee based on the last digit (5 characters) of their employee number. The table that the data is assigned to is dbo.Employee and the field is “EmpNumber” and the value needs to populate the same table but the field is “EmpGroup”. Would I use an IF function or DLookup:
Any employee number ending with 1, 2 or 3 should be assigned a “1” in EmpGroup field.
Any employee number ending with 4, 5 or 6 should be assigned a “2” in EmpGroup field.
Any employee number ending with 7, 8, 9 or 0 should be assigned a “3” in EmpGroup field.
If you know a FAQ or post that you can refer me to that looks at the last character in the EmpNumber field and then groups the character to the right number that would be great. Thank you in advance for your assistance.