If you can calculate LastCommuned, why store it at all? You would be better
off just calculating it on the fly. Storing it is just asking for trouble...
Assuming you have a structure like
CREATE TABLE Communion(
ChurchMemberID INT NOT NULL,
CommunionDate DATE NOT NULL,
PRIMARY KEY (ChurchMemberID, CommunionDate)
)
doing the following will give you the last CommunionDate for each member.
SELECT ChurchMemberID, Max([CommunionDate])
FROM tblMember LEFT JOIN tblCommunion ON tblMember.MemberID = tblCommunion.
ChurchMemberID
ORDER BY ChurchMemberID
GROUP BY ChurchMemberID;
Then you can join that query back to the Members table on ChurchMemberID, and
get the member's name, address, and all that ...
(Hey, John... tell him why storing derived/calculated values is a bad idea...)
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201001/1