Is there a syntax in SQL that will allow me to select only the last 5 transactions record for each customer?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Last 5 records (Access 2K)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Last 5 records (Access 2K)
- This topic has 4 replies, 3 voices, and was last updated 20 years, 11 months ago.
AuthorTopicWSkucingtidur
AskWoody LoungerMarch 31, 2004 at 2:03 pm #403068Viewing 3 reply threadsAuthorReplies-
WBell
AskWoody_MVPMarch 31, 2004 at 2:21 pm #807509That is largely dependent on the record structure. Assuming that you have a method for sorting them that shows you the most recent record first, you can use the TOP option to specify the top 1,2 5, 10 or whatever. You can also set that in the QBE view by displaying the properties for the query and replacing ALL in Top Values with 5.
-
WBell
AskWoody_MVPMarch 31, 2004 at 2:21 pm #807510That is largely dependent on the record structure. Assuming that you have a method for sorting them that shows you the most recent record first, you can use the TOP option to specify the top 1,2 5, 10 or whatever. You can also set that in the QBE view by displaying the properties for the query and replacing ALL in Top Values with 5.
-
WSShane Sargent
AskWoody LoungerMarch 31, 2004 at 2:21 pm #807511Assuming you have a time/date stamp, transaction# and customer# in the transaction table, base a new query on the transaction table and bring down the fields in the order that I listed them, making sure the time/date stamp is the furtherst to the left. Sort descending by date/time stamp. Add criteria so you select transactions for the customer you wish. Right click in the top pane of the query designer and chose Properties. You’ll see a Top Values property you can set — enter the number 5 to get the last five transactions.
-
WSShane Sargent
AskWoody LoungerMarch 31, 2004 at 2:21 pm #807512Assuming you have a time/date stamp, transaction# and customer# in the transaction table, base a new query on the transaction table and bring down the fields in the order that I listed them, making sure the time/date stamp is the furtherst to the left. Sort descending by date/time stamp. Add criteria so you select transactions for the customer you wish. Right click in the top pane of the query designer and chose Properties. You’ll see a Top Values property you can set — enter the number 5 to get the last five transactions.
Viewing 3 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
-
File Naming Conventions (including Folders) (Awaiting moderation)
by
Magic66
2 hours, 2 minutes ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
5 hours, 28 minutes ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
1 hour, 10 minutes ago -
Outlook 2024 importing Calendar and Contacts – FAILURE
by
Kathy Stevens
43 minutes ago -
Adding Microsoft Account.
by
DaveBRenn
6 hours, 54 minutes ago -
Windows 11 Insider Preview build 26120.3576 released to DEV and BETA
by
joep517
1 day, 6 hours ago -
Windows 11 Insider Preview Build 22635.5090 (23H2) released to BETA
by
joep517
1 day, 6 hours ago -
Windows 11 won’t boot
by
goducks25
1 day, 20 hours ago -
Choosing virtual machine product for Windows on Mac
by
peterb
20 hours, 39 minutes ago -
Rest in Peace
by
Roy Lasris
2 days, 1 hour ago -
CISA : Install Windows March 2025 Updates until April 1 or shut down PC.
by
Alex5723
2 days ago -
Google proposes users with incompatible Win 11 PCs to migrate to ChromeOS Flex
by
Alex5723
2 days, 1 hour ago -
Drivers for Epson Perfection V600 Photo – scanner
by
Bookman
1 day, 6 hours ago -
Long Time Member
by
jackpet
2 days, 4 hours ago -
Woody Leonhard (1951–2025)
by
Will Fastie
1 day, 3 hours ago -
What I learned from Woody Leonhard
by
B. Livingston
1 day, 21 hours ago -
Windows Settings today
by
Simon Bisson
2 days, 12 hours ago -
Mail Merge magic in Microsoft Word
by
Peter Deegan
1 day, 19 hours ago -
Businesses in the crosshairs
by
Susan Bradley
1 day, 2 hours ago -
Double-row taskbar?
by
CWBillow
1 day, 14 hours ago -
Upgrading non-supported HW to Win 11
by
RetiredGeek
3 hours, 40 minutes ago -
Audio locks up after 15 minutes
by
WSArthurR
3 hours, 11 minutes ago -
Copilot app uninstalled
by
Susan Bradley
1 hour, 23 minutes ago -
Strongbox Password Manager Sold to Applause Group – Cost Escalation Imminent
by
Paul T
3 days, 22 hours ago -
SharePoint
by
CBFPD-Chief115
2 days, 20 hours ago -
Google replacing Google Assistant with Gemini AI assistant
by
Alex5723
4 days ago -
You can no longer stop Alexa from sending voice recordings to Amazon
by
Alex5723
4 days, 1 hour ago -
Meeting Woody in person
by
Susan Bradley
4 days, 12 hours ago -
Bear with me – getting some options regarding membership
by
Susan Bradley
4 days, 16 hours ago -
Difficulty installing Microsoft Office Home and Business 2024
by
Kathy Stevens
3 days, 21 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.