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 
Moving Legos
Juan C Rivera 
            
5 years ago
Richard, Alex, Adam good Morning from Japan.
Question, not a real problem but just wondering.
On the order invoice Order lisF is built on a query.  I tool the contact form of the customer form and placd the orderlistF in its place (I moved the leggo) It filters the form to show only the orders from the customer.  I playd with the query to show only orders not ship, paid is ok but when its gone I dont wish to see it.  then I open the orderlistf and I wish to see it all.  
Is it possible to use one form with 2 SQL statement, that can detect if its a sub form use sql A, if its just a form use SQL B?
As you say you showed my how to play with the parts Dont know if this is even possible but you always have a trick or two for things like this...

V/r
Juan
Adam Schwanz  @Reply  
           
5 years ago
If im understanding you right, just make an event on the on current of your main form with the subform to apply the sql to the subform. Then when you open it not as a subform it would still have its default sql.
Adam Schwanz  @Reply  
           
5 years ago
Subforms are kind of tricky to code I THINK you'd want something like this with your fields in the on current of the main form.

Forms!OrderF!OrderSubF.Form.recordsource = your SQL
Richard Rost  @Reply  
          
5 years ago
Yep. Adam has it. Set the RecordSource to whatever you want to see when you JUST open the form. Then if you open it as a subform, I would put an OnOpen event in the parent that changes the subform's recordsource.
Juan C Rivera OP  @Reply  
            
5 years ago
Going to try it sound good.
Big Thank to you guys.

V/r
Juan

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/7/2026 12:51:28 AM. PLT: 0s