J
JudyB
Once again I find myself scratching my head. I thought I could use the
following code to automatically return the value of a specific field from my
query but, I am having problems. After reading up on DLookup and it's
problems...I'm asking myself if I need to do something else. My Code:
=DLookUp("[DepartmentName]","Service Record Query","[EmployeeID] =" &
[Forms]![Service Record Query]![EmployeeID] & " and [DateEnd] is Null")
I continue to get #Name? error message. I put the code in an unbound text
box on the main form in hopes of automatically returning the name of an
employee's current department. Can anyone tell me how to correct the code or
advise me on another method of accomplishing my goal? Thanks in advance for
any help.
following code to automatically return the value of a specific field from my
query but, I am having problems. After reading up on DLookup and it's
problems...I'm asking myself if I need to do something else. My Code:
=DLookUp("[DepartmentName]","Service Record Query","[EmployeeID] =" &
[Forms]![Service Record Query]![EmployeeID] & " and [DateEnd] is Null")
I continue to get #Name? error message. I put the code in an unbound text
box on the main form in hopes of automatically returning the name of an
employee's current department. Can anyone tell me how to correct the code or
advise me on another method of accomplishing my goal? Thanks in advance for
any help.