Hi Everyone!, appreciate if I could get some expert help.
A little background: I have an Employee form/table that links to a JobHistory subform/table. The subform shows relevant details for the Emps current Position/Job by way of the EndDate of the JobHistory not being complete (Null). This is acheived by way of a CurrentJob query. One of the details of the current job is the Division and accompanying DivisionID. I want to store the DivisionID into a field on the Employee Table.
I have spent most of today researching Post's, in lots of forums, for the use of DLookup. while It took we hours to get my head around, and I had success on simple models.
...And here's the rub, I'd like to know if I can do the following and test for the Null EndDate to get the DivisionID?
my code goes like this and returns an invalid result:
=DLookUp("[DivisionID]","tblJobHistory","[EmployeeID] = ' " & [EmployeeID] & " And " & [EndDate] & "Is Null" & " ' ")
I'm sure the end bit's not right, but I'm losing focus. It's loaded in the control source property of an unbound text box (at the moment)
A little background: I have an Employee form/table that links to a JobHistory subform/table. The subform shows relevant details for the Emps current Position/Job by way of the EndDate of the JobHistory not being complete (Null). This is acheived by way of a CurrentJob query. One of the details of the current job is the Division and accompanying DivisionID. I want to store the DivisionID into a field on the Employee Table.
I have spent most of today researching Post's, in lots of forums, for the use of DLookup. while It took we hours to get my head around, and I had success on simple models.
...And here's the rub, I'd like to know if I can do the following and test for the Null EndDate to get the DivisionID?
my code goes like this and returns an invalid result:
=DLookUp("[DivisionID]","tblJobHistory","[EmployeeID] = ' " & [EmployeeID] & " And " & [EndDate] & "Is Null" & " ' ")
I'm sure the end bit's not right, but I'm losing focus. It's loaded in the control source property of an unbound text box (at the moment)