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.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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 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
-
KB5058379 / KB 5061768 Failures
by
crown
7 hours, 19 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
9 hours, 58 minutes ago -
At last – installation of 24H2
by
Botswana12
10 hours, 42 minutes ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
20 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
22 hours, 54 minutes ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
16 hours, 14 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
1 day, 12 hours ago -
Another test post
by
gtd12345
1 day, 12 hours ago -
Connect to someone else computer
by
wadeer
1 day, 6 hours ago -
Limit on User names?
by
CWBillow
1 day, 10 hours ago -
Choose the right apps for traveling
by
Peter Deegan
23 hours, 54 minutes ago -
BitLocker rears its head
by
Susan Bradley
7 hours, 55 minutes ago -
Who are you? (2025 edition)
by
Will Fastie
6 hours, 52 minutes ago -
AskWoody at the computer museum, round two
by
Will Fastie
1 day, 2 hours ago -
A smarter, simpler Firefox address bar
by
Alex5723
1 day, 22 hours ago -
Woody
by
Scott
2 days, 8 hours ago -
24H2 has suppressed my favoured spider
by
Davidhs
7 hours, 32 minutes ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
2 days, 22 hours ago -
MS Office 365 Home on MAC
by
MickIver
2 days, 16 hours ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
3 days, 12 hours ago -
Flash Drive Eject Error for Still In Use
by
J9438
7 hours, 16 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
4 days, 7 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
4 days, 7 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
3 days, 11 hours ago -
Migrate off MS365 to Apple Products
by
dmt_3904
3 days, 11 hours ago -
Login screen icon
by
CWBillow
3 days, 2 hours ago -
AI coming to everything
by
Susan Bradley
16 hours, 44 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
4 days, 23 hours ago -
No Screen TurnOff???
by
CWBillow
4 days, 23 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
3 hours, 39 minutes 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.