I have a database to manage a company with 4 divisions. A table [employee] has a related form with the employees title. In order to break down employees by division, I created a table [titleconversion] where fields have the [Title] and [Division] and [EmploymentStatu s]
In the on the form [employees]![Title] i am using an afterupdate DLookup code to place [Division] and [EmploymentStatu s] based on the entry. My problem is NOTHING is happening. No errors, debugging issues, or results populating the fields. I have used DLookup many times but it seems I am missing something. I have used the code both ways listed below with same non-result. Any ideas would be appreciated.
In the on the form [employees]![Title] i am using an afterupdate DLookup code to place [Division] and [EmploymentStatu s] based on the entry. My problem is NOTHING is happening. No errors, debugging issues, or results populating the fields. I have used DLookup many times but it seems I am missing something. I have used the code both ways listed below with same non-result. Any ideas would be appreciated.
Code:
division = DLookup("[Division]", "[titleconversion]", "Id= " & Forms!employee!Title)
EmployeeStatus = DLookup("[EmploymentStatus]", "[titleconverson]", "Id=" & Forms!employee!Title)
division = DLookup("Division", "titleconversion", "Id= " & Forms!employee!Title)
EmployeeStatus = DLookup("EmploymentStatus", "titleconverson", "Id=" & Forms!employee!Title)
Comment