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 
Open a form and set dropdown
David Servo 
    
5 years ago
Hi, this is David from Washington:

I have a question just piggybacking off of the Order/Invoice template which I've been watching. Suppose going from the customers to orders form, the order form also has a combo box that can also be used to select a customer and show their orders. I can use the Openform... CustID=me.CustID similar to the Inventory video. However, is there a way I can have that customer auto-selected in the Orders form list box? So if I'm on "James Kirk" in the customers form, I want to bring up him in the orders form but also have him auto-selected in a customer select combo box because otherwise his orders won't load - the orders form loads orders in the afterupdate of the customer select combo box.

Hope I'm being clear :)
David Servo OP  @Reply  
    
5 years ago
You know what... I should have watched just a few minutes further. The idea of setting a default value in the combo box is BRILLIANT I had no idea you could do that. The app I'm working on now is similar to the Inventory app except that Orders and Order Details forms are combined as form and subform respectively, and the orders form also has a combo box that you can select a customer by manually. I still have a separate customers form, but clicking on the Orders button opened the Orders form but never went to the customer.

The only thing I have yet to solve is that since Order Details is a SUBFORM of the Orders form, it's tough to get the order total (which I store in the orders table) to update the same way Rich as it in the Inventory video, since that order total is not just on the order lines form, but also on the parent form and I can't get the two to talk to each other.
Richard Rost  @Reply  
          
5 years ago
Yeah, always finish a video before trying to figure out how to do something. Chances are it will be covered. My advice is to NOT store the order total in the order table. You can calculate it on the fly, like I do, from the order details. Why store it? The only exception would be if you're running MASSIVE reports that have queries with THOUSANDS of orders on them. Storing the order total would make that run faster. But for most databases, it's not necessary. Don't store what you can calculate. However, if you DID want to store it, you'd need an AfterUpdate event each time a line item was modified, added, or deleted. It's a pain.

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: 5/6/2026 7:43:24 AM. PLT: 0s