Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Dlookup Question
Lee Shastid 
    
2 months ago
Here are two things I realized that I can do with pulling info from a table.
1. If I create a VENDOR combo box on a form, I actually pulled the VENDOR Name, address, city , state, zip over when I made the combo box.
2. I also know how to do it using DLOOKUP for the address, city, state, and zip code which I went back and corrected it to that way. Just for knowledge is only reason I am asking.  

Since it can be done both ways is there a normal way that it should be done or will both ways work, or will one way cause problems later.
Donald Blackwell  @Reply  
       
2 months ago
It depends on how you're using the data you're pulling as to which is best.

Keep in mind that a DLookup only pulls the value of one field (or one concatenated field) at a time so you have to make multiple round trips to get the info for each field.

If you are building a combo box with the wizard (or SQL), you are grabbing all the data in one trip to the table. Each of those can be stored in columns in the combo without being viewable if you choose. But then when the combo box is updated, the new additional information is already in your form, you just have to copy it from the combo to other fields if necessary.
Lee Shastid OP  @Reply  
    
2 months ago
Thank you. So either way would have worked. I will stay with the lookup way.
Richard Rost  @Reply  
          
2 months ago
Donald is exactly right. Both methods work, and the "best" approach depends on what you're trying to accomplish.

For beginners, I usually recommend putting the extra fields you need directly into the combo box's Row Source. That way, after the user makes a selection, the data is already there. It's easy to populate the other controls without making additional trips back to the table. It also lets you display helpful information to the user. For example, if you have two customers named Joe Smith, showing the street address or city in the combo box makes it much easier to pick the correct one.

One exception is Long Text (Memo) fields. Those can't be included in a combo box's Row Source, so if you need one of those values, you'll have to retrieve it afterward with DLookup (or another query).

As you get into more advanced databases, especially those running over a slow network or connected to SQL Server over the Internet, you'll often want to keep your combo boxes lean. In those cases, I usually bring over just the key field and one descriptive field, then retrieve anything else only if I actually need it. That reduces the amount of data traveling across the network and can improve performance.

So for a local Access database, I usually favor the combo box approach. For remote databases where performance matters, it's worth being more selective about what you bring over.
Lee Shastid OP  @Reply  
    
2 months ago
Richard
Thank you. I have a better understanding of it now.

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

Next Unseen

 
 
What's This?

 

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: 9/6/2026 8:46:17 AM. PLT: 1s