Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Display Latest Record
Joe Hood 
      
6 years ago
Hope all is Well my Friend. I have a note table that tracks multiple notes for our plumbing permits as they move through the system. I would like to display the latest note on my permit list form. Can I use the DLookUp function to display the latest note instead of the first note? Or is there a better way?
Richard Rost  @Reply  
          
6 years ago
Hi Joe. All is well. Use DMAX to get the date of the most recent note, and then use DLOOKUP to get its ID. Then use that ID to lookup any other details you need.

LatestDate = DMAX("DateField","NoteT","PermitID=" & PermitID)
LatestID = DLOOKUP("NoteID","NoteT","DateField=#" & LatestDate & "#")
NoteText = DLOOKUP("NoteText","NoteT","NoteID=" & LatestID)


This would actually make a really good TechHelp video. A few other people have asked me similar questions recently.
Richard Rost  @Reply  
          
6 years ago
I can see from your badges that you're not into the Developer classes yet. This same technique will work as calculated fields in a query. However note that domain aggregate functions like DLOOKUP and DMAX will slow things down a lot if you have a big query with a lot of records. Depending on how your tables are set up you could use an aggregate query with MAX to determine that date, and that would save you some time. I'll try to cover this in the TechHelp video. No promises on when I'll get it finished though. The list is super long.
Richard Rost  @Reply  
          
6 years ago
See, Alex, the badges came in handy! Great idea.
Alex Hedley  @Reply  
           
6 years ago
Joe Hood OP  @Reply  
      
6 years ago
Hello Richard,
Glad all is well! Unfortunately I simply have not had the time to get back into your classes. Hope to focus on them in the very near future. I actually can't wait to get to the Developer level. That said, your Aggregate Query suggestion using the MAX function worked perfectly, your help is very much appreciated.
Have a Great Rest of your Day.
Richard Rost  @Reply  
          
6 years ago
My pleasure. Glad it worked well for you.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/26/2026 10:36:13 PM. PLT: 1s