I have a database with 3 linked tables. One has the people (table1), one has the orders (table2), and one has the specifics of each order (table3). In the table3, each entry has a date. For example, when we get an order for the same service, we don’t create a new order. We just add a new line to the same order number (table2). How would I create a query with the person’s name (table1) and their most recent activity (table3). When I create the query, I’ve been using the criteria of Max for the date field in table 3. However, as soon as I add any other fields to the table, the person appears several times with mutliple requests. I hope this is clear. Please let me know if you need more info. Any help is greatly appreciated.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Query with most recent (Access 97 SR-1)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Query with most recent (Access 97 SR-1)
- This topic has 4 replies, 2 voices, and was last updated 22 years, 1 month ago.
AuthorTopicWSkanders1
AskWoody LoungerMay 16, 2003 at 9:11 pm #387650Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerMay 16, 2003 at 9:36 pm #677290First, create a query based on the three tables. Add only the primary key from the People table and the date field from the Order Details table. Make the query into a Totals query; leave the Totals option for the primary key as Group By, and set it to Max for the date field. Save this query, I’ll name it qryMaxDate for illustration purposes.
Next, create another new query based on the three tables plus qryMaxDate. Join qryMaxDate to the People table on the primary key, and to the Order Details table on the date field. Add the fields you want to see to the query grid. This query will display each person with their most recent activity, plus other activities on the same day – so there may still be more than one record per person if there is more than one activity on the most recent date. If you want to return only one record per person, make this new query into a Totals query too, leave the Totals option for the fields from the People table and the date field as group by, and set it to First for the other fields. If you want to return a specific record for a person and date, set the sort order so that the desired record comes first.
-
WSkanders1
AskWoody LoungerMay 19, 2003 at 6:36 pm #677930Thanks Hans. This appears to have worked well.
Now I can’t figure out how to get a query with all the People who have never had an order before. If I just use the People table for the query everyone will show up but if I use the Order and Order Details tables in the query then the people with no orders won’t show up. I’m sure there’s an easy solution to this one, I’m just not sure what it is.
Thanks again.
-
WSHansV
AskWoody LoungerMay 19, 2003 at 6:47 pm #677954The default behavior of joins between tables in a query is to return only those records whose values on either side of the join are equal – implying that there *is* a value. To modify this behavior, open the query in design view, and double click a join from the People table to one of the other items. Select the option that says “Return all records from People and …”, then click OK. You will see that the join line now exhibits an arrow from People to the other object. Repeat for the other joins (you may have to experiment a bit to get it right.)
-
WSkanders1
AskWoody Lounger
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Update Issue – Restart but doesn’t complete update
by
CatoRenasci
23 minutes ago -
The Simpsons Kills Off Marge In Shocking Season Finale Twist
by
Alex5723
1 hour, 52 minutes ago -
AnduinOS (Windows 11 look alike)
by
Alex5723
5 hours, 48 minutes ago -
Total Commander updates
by
Alex5723
20 minutes ago -
Have you checked your FICO score?
by
Susan Bradley
3 hours, 37 minutes ago -
Chrome ‘Scream to Unlock’ : Scream louder to get more time on Social Media
by
Alex5723
7 hours, 56 minutes ago -
Taskbar icon size
by
CWBillow
2 hours, 24 minutes ago -
Is it Local or is it Microsoft Account?
by
RetiredGeek
2 minutes ago -
Does Your State Reveal Who’s Been Hacked?
by
Nibbled To Death By Ducks
1 day, 3 hours ago -
A one-year extension to Windows 10 โ almost free!
by
Susan Bradley
1 hour, 43 minutes ago -
Windows Configuration Update (KB5062324) โ June 2025
by
Alex5723
14 hours, 49 minutes ago -
A federal judge sides with Anthropic in lawsuit over training AI
by
Alex5723
1 day, 8 hours ago -
Name of MS Word Formatting Feature
by
John Baum
21 hours, 6 minutes ago -
InControl Failure?
by
Casey H
19 hours, 29 minutes ago -
Microsoft : Free 1 year support for Windows 10 after EOL
by
Alex5723
21 hours, 11 minutes ago -
MS-DEFCON 3: Businesses must tread carefully
by
Susan Bradley
1 hour, 39 minutes ago -
McLaren Health Care says data breach impacts 743,000 patients
by
Nibbled To Death By Ducks
2 days, 7 hours ago -
WhatsApp banned on House staffers’ devices
by
Alex5723
2 days, 2 hours ago -
Is your device eligible?
by
Susan Bradley
2 days, 10 hours ago -
Windows 11 Insider Preview build 26200.5661 released to DEV
by
joep517
2 days, 16 hours ago -
Windows 11 Insider Preview build 26120.4452 (24H2) released to BETA
by
joep517
2 days, 16 hours ago -
Hello Windows…My Problem is Windows Hello…
by
rdleib
2 days, 17 hours ago -
New Canon Printer Wants Data Sent
by
Win7and10
2 days, 18 hours ago -
I set up passkeys for my Microsoft account
by
Lance Whitney
7 hours, 20 minutes ago -
AI is for everyone
by
Peter Deegan
2 days, 17 hours ago -
Terabyte update 2025
by
Will Fastie
2 days, 11 hours ago -
Migrating from Windows 10 to Windows 11
by
Susan Bradley
18 hours, 56 minutes ago -
Lost sound after the upgrade to 24H2?
by
Susan Bradley
1 day, 11 hours ago -
How to move 10GB of data in C:\ProgramData\Package Cache ?
by
Alex5723
1 day, 20 hours ago -
Plugged in 24-7
by
CWBillow
3 days, 2 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.