Dear Windows Secrets MS Access Wizards,[INDENT]Side note:
When posting your reply, as I am not an expert at MS Access, please present your answers with MORE detail than you think is neccesary, with numbered steps if appropriate – thanks!
[/INDENT]
I am running Access 2003. My organization has hundreds of clients who are referred to us. I want to have a list which displays all those clients. However, each client has multiple referrals, and I only want to list to show the most recent one.
To solve this problem, the previous Database Admin created a query called “MaxofReferrals”.
28809-MaxOfReferrals
The clients (called “PCs”, not short for Personal Computers) are set to “Group By” on the Totals row and the ReferralID’s are set to “Max” in the total row.
Then I created a second query called “Main List” which displays the ID, name, social security #, status, etc. which is linked to the MaxReferral table. Running that query generates a list that shows each person once. I have it set you can click on the name, and it goes into the full record of the client.
28810-MainList
Here is the problem:
Some of the ReferralID’s for newly keyed referrals into the database were assigned autonumbers that are lower than the older referral number for a client. So when the list displays, the older referral record is showing up in the list, not the newely keyed referral.
How can I fix this? I am thinking I need to change the first “MaxofReferrals” query so it sorts on the “DateReferralReceived” field. I tried this with no success, as setting the Totals row to “Max” for a date field didn’t work.
28813-MaxOfReferralsByDateField.jpg
Thanks for your help.
Peter
:confused: