I have two tables. One with multiple records per person (MULTIPLE). One with a single record per person (UNIQUE) (see below samples). I want to update the UNIQUE table based on multiple records/values from the MULTIPLE with various conditions. For example, if any of the records for a given person in MULTIPLE have a living arrangement of "HOMELESS", then populate the HOMELESS field in the UNIQUE table with "YES"
I tried using basic IIF function (IIf(([MULTIPLE].LIVARR="SHELTER" Or [MULTIPLE].LIVARR="HOMELESS"),"YES","NO"),
However, if a person has both Yes and No for homeless status on different records, it seems to be a crapshoot as to which "truth" populates the UNIQUE table.
Any suggestions?
And can anyone tell me how the IIF works in such an instance? would it go through the records sequentially, or something else?
Much thanks in advance!
MULTIPLE TABLE:
ClientID DATE LIVARR
123 1/1/2011 PRIVATE
123 6/1/2010 HOMELESS
123 5/7/2008 PUBLIC
UNIQUE TABLE:
ClientID HOMELESS
123 ???
I tried using basic IIF function (IIf(([MULTIPLE].LIVARR="SHELTER" Or [MULTIPLE].LIVARR="HOMELESS"),"YES","NO"),
However, if a person has both Yes and No for homeless status on different records, it seems to be a crapshoot as to which "truth" populates the UNIQUE table.
Any suggestions?
And can anyone tell me how the IIF works in such an instance? would it go through the records sequentially, or something else?
Much thanks in advance!
MULTIPLE TABLE:
ClientID DATE LIVARR
123 1/1/2011 PRIVATE
123 6/1/2010 HOMELESS
123 5/7/2008 PUBLIC
UNIQUE TABLE:
ClientID HOMELESS
123 ???