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 
Using 2 Combo Boxes to Filter a Table
Tony Hudson 
   
2 months ago
I have 2 combo-boxes which I am trying to filter based on 2 tables which have the variable data, which I want to use to filter the list in the table, which contains the ID field for the 2 combo boxes.
To give more context to my question I am trying to create a database containing verses that crafters would put in greetings cards.The first table contains the type of event (e.g. Christmas), the 2nd is what I have called Sub Event (e.g. Wife). using the cascading combo box lesson I have used method [Forms]![tablename]![ComboName] in the verse query to filter the list that met that criteria. I have got a button that runs a query, but I don't know how to make the list of possible matches' appear in a text box that is also on the form.
Tony Hudson OP  @Reply  
   
2 months ago

Donald Blackwell  @Reply  
       
2 months ago
When you select the value from your sub event combo, your query may likely be returning multiple rows of records. In order to get the "phrase" from each row of that recordset to appear in the text box, you'd need some code (or macro)  to concatenate all the results in to the field.

Or, a simpler method might be to replace the textbox with a list box and then set the rowsource for that list box to the filtered query and just refresh it when the sub-event combo is updated. Then, the user could select whichever phrase they want from the box and you could then have another textbox display just that phrase and any other greetings, etc. This technique would be the same as that of the Cascading Combo Boxes one you've already used, just with a listbox instead of a combo box.
Raymond Spornhauer  @Reply  
          
2 months ago
I would start with this video:

Microsoft Access Relationships

-Raymond
Juan Rivera  @Reply  
            
2 months ago
I agree with Raymond. First, make sure your table relationships are set up correctly. Then review your query carefully, especially the join type being used. It is also important to check how your AND and OR criteria are written. Finally, decide whether you want the join to include all records from the event table, particularly when searching for items that contain both "wife" and "Christmas."

V/r
Juan
Tony Hudson OP  @Reply  
   
2 months ago
I have found that if I run a query based on the verses form:
SELECT verses_tbl.Verse_ID, verses_tbl.Event_ID, verses_tbl.Event_Sub_ID, verses_tbl.Verse
FROM verses_tbl
WHERE (((verses_tbl.Event_ID)=[Forms]![verses_frm]![EventC]) AND ((verses_tbl.Event_Sub_ID)=[Forms]![verses_frm]![SubEventC]));
This query gives me the result I want, but now I want to choose one on the verses in the list. I guess I could get the user to select the verse by typing the number of the Verse ID, but I want the user to print the verse. I am thinking of using a report and designing it to print the verse in a specific place on the report (Greetings cards can be various sizes) Is there any way that you can select from the list created for the query?

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/17/2026 4:41:07 AM. PLT: 1s