Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Courses > Access > Expert > X12 > OrderListF by Tim Smith >
Back to Access Expert 12    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
OrderListF
Tim Smith 
   
3 months ago
In the homework from last class (add the button to open the list of all orders), I ended up with a slightly different solution than what was presented in the lesson.
In the lesson, a new query was made to bring in the OrderID, customer name and calculate the order total. A form was then made to display the information from the query.
In my database, I only created the form and used DLOOKUP and DSUM as the Control Sources for the fields in the form.
Both seem to create the same result. Is this merely a case of two different ways of achieving the same end result? Or is there a reason I would want to put the calculations in the query?
Donald Blackwell  @Reply  
       
3 months ago
Hi Tim,

Both methods work, however, each DLookup and DSum in your form makes a separate call to the database for each record in the list as well as for each total.

Using a query that generates calculated fields instead will typically run significantly faster, especially if you have a lot of records or if/when you split your database and your backend tables are on another machine on the network.
Richard Rost  @Reply  
          
3 months ago
Donald is exactly right. Both approaches can produce the same result, but the query is generally the better tool when you are displaying a list of records.

A domain aggregate like DLookup or DSum is essentially Access saying, "For this record, go look through the table and find/calculate this value." If your continuous form displays 100 orders and each row has several domain functions, Access may be performing hundreds of separate lookups and sums.

A query lets Access assemble the recordset in one operation, including joins and totals. That is usually faster, easier to maintain, and much more noticeable once the database is split and the tables live on a network back end.

I use DLookup, DSum, and the other domain aggregate functions mostly for single values: a control on a form header, a validation check, a default value, or a quick calculation where I am only dealing with one record at a time. For a list of orders, I would definitely use the query.

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

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: 10/25/2026 7:08:57 AM. PLT: 1s