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 
Two Queries in a Form.
Leo Rivera 
   
2 months ago
Hi you all,

Can you guide me to what course I need to see to do the following:  I have a form that have a subform embeded.  Both the main form and the subform control source are two diferent queries.  Both queries has filter criterias.  The main form criteria is a year number and in the subform criteria ask for a month number.  However this criteria is not require when the form is open only the main form query is important to be run.  However the second query appear.  My question is what vba code I need to put for avoiding the second query runs.
Alex Lewis  @Reply  
        
2 months ago
Are you using Parameter Queries? What do your queries do when they run?
Leo Rivera OP  @Reply  
   
2 months ago
The main form execute a query for extract all the data that has the date year for example 2026, embedded to the form has an not visible subform that will appear when I clic a check box that execute the second query.  And this is work fine, what happen is because the form contain 2 different queries when I open the form Access run the 2 queries criteria.  What I want to do is stopped the sencond query until I clic the check box. Is this possible? What is the code that I have to develop in the event of opening the form?
Richard Rost  @Reply  
          
2 months ago
Thanks for your detailed explanation, Leo - I can see you've got a nuanced setup with your form and subform using separate queries, and I appreciate Alex's follow-up questions as well. Since the subform should only run its query when the checkbox is clicked, the ideal approach is to delay setting its RecordSource until then. Or use a button to set it at that time.

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: 4/12/2026 6:38:37 PM. PLT: 0s