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 
Applyfilter Not Working for Subform
Innes Palm 
     
38 days ago
Hello,
I lose the functionality for my status combo box, which acts an 'active'/'expired' status column filter on a customer contracts (continuous) form, when I insert that form as a subform onto the Customers (single) form. I believe the forms are linked correctly as the master and child fields are correct and the moving from 1 customer to another the subform updates correctly.
The VBA code I used when I created the Contracts Subform (which works when that form in standalone) is:

Private Sub StatusCombo_AfterUpdate()
    DoCmd.ApplyFilter , "[Status]='" & Me.StatusCombo & "'"
End Sub


I have copied that code into the VBA of the parent form as well when I was troubleshooting, so now it's in both parent and child form.
I've tried referring to the status combobox in the VBA in the context of the parent form to subform naming nomenclature but still no success.
Please could anyone advise if my approach is wrong, an example of that the correct VBA commands should be?
Thank you in advance.
Raymond Spornhauer  @Reply  
          
38 days ago
I'm not sure what you're trying to accomplish here.  Combo Boxes do not have Filters.  You will have to update the Row Source.

Also... I would watch this video for referring to fields in a subform.  

-Raymond
Innes Palm OP  @Reply  
     
36 days ago
Thank you Raymond for your reply and the link, that's appreciated. Regarding the active/expired status combo box - I was trying to use it to act as a filter, for a continuous form list (customer contracts) (these are both on the same form). I placed the status combo box control just above the continuous form list and everything worked fine. However, when I use that same form as a subform within customer list (single form), the status combo no longer filters the continuous form and try what I may with master and child fields, VBA, etc, I still can't get it to work. For now I have abandoned my approach and tried to achieve what I want a different way. I will watch the link and let you know if I re-attempt the same method and whether successful. Thanks again :)

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 9:33:42 PM. PLT: 1s