Access 2007-2013
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  
 

Forums     

Microsoft Access Forum
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

 
This forum is for the discussion of Microsoft Access.

Access is my personal specialty. Have questions? Comments? Want to discuss how to do something? Post it here. Also, I get a LOT of questions sent to me in Email from people around the world. I'll post the interesting ones in here. Feel free to comment on them.

Click Here To Subscribe to this forum and receive an email update whenever new posts are added, just scroll down to the bottom of this page and enter your email address in the comment form.

Permanent Link
Keywords: microsoft access forum
Post New Topic

Read To Reference Subform by Scott A @ Tue 5/9
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

Show Just This Thread        Post Reply
Read To Reference Subform by Scott A @ Fri 5/5
Hey everyone. Does anyone know the correct verbage for referencing a subform?

Trying to do it from a public module and its not wanting to work itself out.

The subform feeds a list of groups that the main form record relates to. The module updates the list, as there are a couple of unique instances in the Database.

If I type out the full path "Forms!frmExerciseManager!fSubExerciseMuscleGroups.SetFocus", it works just fine. However, since I am doing this from a public module, to serve several different instances, it kind of defeats the purpose of making the module to begin with.

I have tried assigning form variables, variants, even strings and Forms([Form Name String]).Form.

Every combination of this throws one of about 4 different run-time errors. Any Ideas?


Reply from Alex Hedley:

Me.[SubformName].Form.[ControlName]

Forms![FormName].[SubformName].Form.[ControlName]
Forms("FormName").[SubformName].Form.[ControlName]
Form_FormName.[SubformName].Form.[ControlName]

Me.[SubformName]![ControlName]
Forms![FormName].[SubformName]![ControlName]
Forms("FormName").[SubformName]![ControlName]
Form_FormName.[SubformName]![ControlName]

Me.[qryReviewJobs Subform]![txtJobNumber]
Me.[qryReviewJobs Subform].Form.txtJobNumber
Forms![frmFieldServiceDatabase].[qryReviewJobs Subform]![txtJobNumber]
Forms("frmFieldServiceDatabase").[qryReviewJobs Subform]![txtJobNumber]
Form_frmFieldServiceDatabase.[qryReviewJobs Subform]![txtJobNumber]

From: Referring to Items on a Sub-Form
Show Just This Thread        Post Reply

Collapse All Topics

 

Post Your Comments or Subscribe
    If you would like to be notified of new posts on this forum,
    just enter your email address below. It will be kept private.
 
If you just want to subscribe to get email updates when this forum is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
 
  Your Name:  Required
  Your Email:  NOT Public
  Subject:
  Comments:

 

Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 9+7:
  
  Notify me when the this forum is updated
  Remember Me for my next comments
  
 
 
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be.
As always, I promise to never give away your personal information to anyone else, ever.

NOTE: If you don't leave your name and email address, DON'T expect a reply. I can't promise a personal reply to everyone who posts here. I TRY my best, but I cannot guarantee it. If you don't leave your real name and email address, I won't even bother. I usually just hit DELETE. -Richard

 

 

You may want to read these articles from the 599CD News:

5/17/2017Access Advanced 6 is Online
4/9/2017Microsoft Access Advanced 5
4/9/2017Microsoft Access Advanced 4
4/4/2017Microsoft Drops Access Web Apps
4/3/2017Access Advanced 5 is finished
3/26/2017Access Advanced 4 is Finished and Online
3/19/2017Microsoft Access Advanced 3
1/17/2017Microsoft Access Advanced 2
12/7/2016Access Advanced 2 is Finished
9/20/2016Microsoft Access Advanced 1
 

Learn
 
Accessindex
Excelindex
Wordindex
Windowsindex
PowerPointindex
Photoshopindex
Visual Basicindex
ASPindex
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Free Upgrades
Insider Circle
Student Databases
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Articles
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Help
 
Live Chat
Customer Support
WalkThru Tutorials
Troubleshooting
FAQs
TechHelp
Consulting Services
About Us
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Gift CDs
Contact
 
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP