Hi All
I wonder if anyone can help me with a problem around joins in a query?
Let's say I have tblOrders and tblPeople. tblOrders contains a PersonID field corresponding to a record in tblPeople. Each record in tblPeople has a PersonName text field.
The tables are set as related in "relationships", between the ID field of tblPeople and the PersonID field of tblOrders - enforce referential integrity and both the cascade options.
I want to return records from tblOrders that meet certain criteria, but in the query results include the PersonName field from tblPeople.
Left join seems to return all the records I want from tblOrders (according to whatever criteria I set) but gives null values for PersonName for all records in which PersonID is a different value to the most recent record in tblOrders matching the criteria.
How can I get the query to display PersonName values for all of the results?
Thanks in advance
I wonder if anyone can help me with a problem around joins in a query?
Let's say I have tblOrders and tblPeople. tblOrders contains a PersonID field corresponding to a record in tblPeople. Each record in tblPeople has a PersonName text field.
The tables are set as related in "relationships", between the ID field of tblPeople and the PersonID field of tblOrders - enforce referential integrity and both the cascade options.
I want to return records from tblOrders that meet certain criteria, but in the query results include the PersonName field from tblPeople.
Left join seems to return all the records I want from tblOrders (according to whatever criteria I set) but gives null values for PersonName for all records in which PersonID is a different value to the most recent record in tblOrders matching the criteria.
How can I get the query to display PersonName values for all of the results?
Thanks in advance