I have an Access Form, my code functions, but needs serious help! I need to assign a group of employees in Department 160 to their own special group with their own Supervisor, based on their employee number that shows up in Me.txtEmpNumber. How can I make this code easy to maintain as it will be used in multiple places and employees come and go?
I would like to only have to change the employee #'s in one place!
I would like to only have to change the employee #'s in one place!
Code:
Case "SOUTH"
Me.txtSupervisor = EMAIL_SUPERVISOR_SOUTH
Case "CENTRAL"
Me.txtSupervisor = EMAIL_SUPERVISOR_CENTRAL
Case "NORTH"
If Me.txtEmpNumber = 395 Or Me.txtEmpNumber = 634 Or Me.txtEmpNumber = 749 Or Me.txtEmpNumber = 1050 _
Or Me.txtEmpNumber = 1100 Or Me.txtEmpNumber = 1108 Or Me.txtEmpNumber = 1109 Then
Me.txtSupervisor = EMAIL_SUPERVISOR_NORTH_SALES
Else
Me.txtSupervisor = EMAIL_SUPERVISOR_NORTH_SERVICE
End If
Case Else
Me.txtSupervisor = ""
End Select