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 
To Reference Subform
Scott A 

9 years ago
Alex, thank you for getting back. A lot of stuff you have suggeted has helped greatly. Unfortunately this missed the mark. Its my fault, I did a poor job of explaining.

I created a module, purposed to update combo box lists. They are on forms and  on subforms. And since there are multiple from different forms, etc, I want a variable to pass the subform name, the combo list can be dynamically updated.

It will then ask if we add more values, or lock down the record.

If question answers yes, then I need to go to new record on subform. Otherwise, it will lock the entire record for edits.

Much of what I have been able to find, says I should put code in the subform and call it from the module. If I do that, it kinda defeats the purpose of the List Update Module.

I have tried every combination I could think of and there are 3 or 4 runtime error that deal exclusively with "Unable to find" on the subform.


Reply from Alex Hedley:

So you don't want this method on each subform as there might be multiple sub forms that all will do the same thing, if yes do x, if y lock?

Could you not pass a FORM object to the method and then loop through the controls on that form checking for listbox, you could use the Tag property that you set on the listbox on each subform so you know to get that control in the module then call the generic lock etc.

It's an old video of mine but it explains the concept.
Access Tip: Check a Form for Blank Controls

Change this: Me.Controls to the Form object.
X to the tag you gave
FUNCTION/PROPERTY to whichever one you need, like ctrl.LOCKED = TRUE


For Each ctrl in Me.Controls
  If ctrl.Tag = "X" Then
    ctrl.FUNCTION
  End If
Next

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 1:00:32 AM. PLT: 1s