You must have a "main" table with a single list of PersonID.
Lets assume it is called tblPeople, PK = "ID"
So, use that table to provide a unquite list of PersonID.
The query can be like:
select FirstName, Lastname, WorkPhone,
PersonID, EDate, Amount, TransType
from tblPeople
inner join tblTransactions
on tblPeople.id = tblTransactions.PersonID
Where tblTransactions.ID =
(select top 1 ID from tblTranactions
where PersonID = tblPeople.id order by EDATE DESC, ID DESC)
IS IS VERY important to note that the order by of
EDATE DESC, ID DESC
YOU MUST include the ID DESC in case there can be more then one transaction
for that date. So, I am assume that for all of your tables, you do include a
default primary key column of "id".
Also, note that the above solution is nice, since you can easily just drop
in additional parent, or child records from either table in he query
builder.
Also, if you want to include ALL people in the repot/query...even if they do
NOT have
a transaction date, change the "inner join" to a "left join", and add a
or (tblTransactions.id is null)
to the above condition.
So, build the query in the query builder, drop in both tables. Draw the join
line. and then simply grab/drop in all the fields you need from both tables.
And, then drop in the transaction.id column, and type in eh above condition
into he "where" part of the query builder:
(select top 1 ID from tblTranactions
where PersonID = tblPeople.id order by EDATE DESC, ID DESC)
So, you actually build this whole thing from the query builder, and the ONLY
manual entry part is the above condition for the transaction.id field
collum. The rest is all drag and drop...