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 Expert 10    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
DLookup in Reports
Kent Jamison 
    
3 years ago
I've figured out to use DLookup and Comboboxes in forms, thanks to the excellent help in this lesson and the other DLookup videos.  I now want to create a few reports, but the fields in Comboboxes I've used in the forms only leave numbers in the underlying tables I'm using in reports.  How do I get the report to convert those ID numbers back to actual data (like person's names) in the reports?  Can I use DLookup?  Or should I use some other trick?
--Kent J.
Richard Rost  @Reply  
          
3 years ago
Yep. DLookup and a text box. OR you could join the other table into a query and get the value that way. I recommend that if you have lots of records in your report. DLookup is slow. One record? Fine. 10,000 records, it'll slow things down a lot.
Richard Rost  @Reply  
          
3 years ago
Look at my OrderInvoiceQ in Invoicing.
Richard Rost  @Reply  
          
3 years ago
I didn't realize this was posted in the Access Expert 10 class... this is the class where I literally show you how to do just that in the invoice. :)
Kent Jamison OP  @Reply  
    
3 years ago
Richard,
Found it, at the very, very end (last 2 mins) of Lesson 3. I missed it when going through it before asking the question. Sorry for the bother.
Richard Rost  @Reply  
          
3 years ago
No bother at all.
Kent Jamison OP  @Reply  
    
3 years ago
Ok.  Call me stupid.  I'm still not getting this.  Here's a screenshot of my SupervisorT, with the primary key and foreign keys to my CurrentPersonnelID, respectively.  In it have saved the values from the SupervisorCombo and TeamLeadCombo from my SupervisorF form.  I want to now create a report that shows all the names of each employee's name and their team lead and supervisor.  I've reviewed the OrderInvoiceQ in your Invoicing TechHelp video, which is a very good review, and Expert 10, Lesson 3.  I've tried dozens of permutations of DLookUp to change the values from SupervisorCombo and TeamLeadCombo in SupervisorT.  Nothing seems to show the names of the people as found in my CurrentPersonnelT.  I'm thinking it should be something like: =DLookUp("LastName","CurrentPersonnelT","CurrentPersonnelID=" & [SupervisorID]), but this gives an #Error in each space.
Kent Jamison OP  @Reply  
    
3 years ago

Adam Schwanz  @Reply  
           
3 years ago
SupervisorID is your autonumber it looks like? Wouldn't you want to do CurrentPersonnelID?
Kent Jamison OP  @Reply  
    
3 years ago
Adam, I've tried that before too, and it gives me a circular reference error.  Because the team leads, supervisors, and employees are all in CurrentPersonnelT.
Richard Rost  @Reply  
          
3 years ago
If CurrentPersonnelID, Supervisor(ID?), and TeamLead(ID?) all point to the CurrentPersonnelT then you'll bring in THREE separate copies of that table into the query and make separate joins to each field. Watch the Self Join Relationships video. You'd do the same thing with Mother and Father... join to the same table twice.
Kent Jamison OP  @Reply  
    
3 years ago

Kent Jamison OP  @Reply  
    
3 years ago
It took some finagling, but I finally figured it out.  The key turning point was taking the three separate copies of CurrentPersonnelT and labeling the fields with no suffix, suffix "_1", and suffix "_2", accordingly in SupervisorQ.  This way Access can distinguish which copy of the CurrentPersonnelT to pull the appropriate field from.  Thanks for the pointers; it put me on the right path to figuring ou the solution.  
Here's some unsolicited constructive feedback: Add the suffix to your Self Join Relationships or Invoicing videos because I couldn't find any mention of it in any of them.
Richard Rost  @Reply  
          
3 years ago
When you bring a table into a query multiple times access automatically adds that suffix. You just have to know to bring the field in from the correct table. Maybe I'll do an updated video on this.
Richard Rost  @Reply  
          
3 years ago

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

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: 4/30/2026 1:43:36 AM. PLT: 1s