I am new to Access, so thanks to anyone who can reply.
Problem: I want a field in a form to reference either one source in one table or another source in another table, depending on the results of evaluating another source as IsNull. My code for my control source looks like this...
=IIf(IsNull([EmployeeID])=True, [Location] , [Employees]![DeskLocation] )
I always get a #name error. If I substitute both arguments as "True Part" and "False Part" the expression works fine. If I substitute only one argument as text I get a #error when the other argument is the one being evaluated. So, it has something to do with be referencing [Location], which is in the same table as [EmployeeID], or [Employees]![DeskLocation]...or both. Or, the problem may be some other aspect of these sources, like formatting perhaps? Though I've made sure the format of all of these sources are all Text.
Thanks! I'm in a bind and I appreciate any assistance.
Problem: I want a field in a form to reference either one source in one table or another source in another table, depending on the results of evaluating another source as IsNull. My code for my control source looks like this...
=IIf(IsNull([EmployeeID])=True, [Location] , [Employees]![DeskLocation] )
I always get a #name error. If I substitute both arguments as "True Part" and "False Part" the expression works fine. If I substitute only one argument as text I get a #error when the other argument is the one being evaluated. So, it has something to do with be referencing [Location], which is in the same table as [EmployeeID], or [Employees]![DeskLocation]...or both. Or, the problem may be some other aspect of these sources, like formatting perhaps? Though I've made sure the format of all of these sources are all Text.
Thanks! I'm in a bind and I appreciate any assistance.