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 |
Query Criteria from ComboBoxes
Charles Durocher 
    
4 years ago
Im in building an Order Form that contain multiples combo boxes for selecting the right product. I want to know how i can build a query criteria that will produce the product ID if those 4 combos boxes are slected (CategoryCombo,ManufacturCombo,NameofproductCombo,ColorCombo)
Adam Schwanz  @Reply  
           
4 years ago
Like IIf([Forms]![FormName]![FieldName] Like "*",[Forms]![FormName]![FieldName],"*")

This criteria will limit it to the product chosen if there's anything chosen, otherwise it will show all
Adam Schwanz  @Reply  
           
4 years ago
Sorry just seen you said multiple combo boxes.

Are you trying to apply the combo boxes to the same field somehow? Otherwise, you'd just put the criteria under whatever the field was. For instance,

Forms!FormName!DateCombo under Date Field
Forms!FormName!TypeCombo under Type Field
Forms!FormName!ProductCombo under Product Field

etc..
Charles Durocher OP  @Reply  
    
4 years ago
I made a product form with a product id. In this form a made 4 combo boxes in which i select product name, company, color,category. A have an order form that i would like to re use those 4 combo boxes to be able to selected a product. The problem is that im not able to display the price or other related fields because i think order form and product form are not link via a query criteria or something like that..
Adam Schwanz  @Reply  
           
4 years ago
I'm not sure I'm following completely but, I believe what you need actually is a many to many relationship Many-to-Many
Then you have your products and your orders, and you put them together in the junction table.
Charles Durocher OP  @Reply  
    
4 years ago
To be more clear. In my order form instead of having a combo box showing me all the products i have in my list of products table, i want to be able to use multiple cascading boxes. So in my order form i have a category combo, a company combo, nameofproductcombo and colorcombo. I made all the cascading boxes right so if i choose category:cars, company:ford, nameofproduct:mustang and color:red its all fine. The problem is all its doing is making me able to select those differents data. I want that if i select those 4 fields the price that i have determine in my product list will appear on my order form. That way i can build orders for my customer very easily. I guess i have to code something in event or in default value of product id that will lookup for the data i ve selected in the combo boxes (categoryid, companyid, nameofproductid and colorid) all at the same time and will produce the productid accordingly. If not clear i can send pictures and my access database
Adam Schwanz  @Reply  
           
4 years ago
So you pick the 4 choices on the combo box then you want the product price that has those 4 choices tied to it to showup?

You just need a DLOOKUP Then DLookup
It would need to use the 4 combos as criteria in the where clause, it would be something like this
Be aware if you are storing short text values instead of numbers, you will need to use Double Double Quotes

You could put this in a button or more ideally, use an After Update event on the combo boxes.

FieldYouWantPriceIn= DLOOKUP("Price","ProductTable","Category=" & CategoryCombo & " and Company=" & CompanyCombo & " and NameOfProduct=" & NameOfProductCombo & " and Color=" & ColorCombo)
Charles Durocher OP  @Reply  
    
4 years ago
I have been able to make it work. My isssue now is that i dont see any selected items in my Invoice Report. I want to be able to use my Invoice Form and the selected the items i want to sell in my combo boxes and print the invoice.
Kevin Yip  @Reply  
      
4 years ago
Hi Charles, do you use a separate invoice table for your invoice data?  If you are using Richard's invoicing method in his YouTube video "Order Entry System with Invoice Report Template", then know that his method simply prints invoices from the order table -- whatever is on the order is printed on the invoice.  You say you don't see any items on your invoice, so I'm guessing you have a different setup, such as a separate invoice table.  In my old job, I used a separate table for invoices too, because invoiced data didn't always match ordered data.

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/25/2026 2:34:30 PM. PLT: 0s