• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

refer to control on subform of main form from a different subform

Hello,

I need to refer to a control on a subform from a different subform on the same main form.  The two subforms are not nested but each is just a subform on the main form.
0
vmccune
Asked:
vmccune
  • 3
  • 3
1 Solution
 
vmccuneAuthor Commented:
My Main form is called CAT

Subform to get the control reference from is CatAPSColorSize, field I want is SumGD

subform that will refernce the field is Summary
0
 
peter57rCommented:
If I've understood your names correctly then...

me.parent.CatAPSColorSize.Form!SumGD

The subform name is not part of the reference.
0
 
vmccuneAuthor Commented:

That gets #ERROR.

From the main form, I made a reference into the subform as below at it works fine.

=[CatAPSColorSize].[Form]![SumGD]
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
vmccuneAuthor Commented:
yours is working now as you gave it to me.  I have noticed this before in 2007 that something seem to fail and then 5 minutes later start working.  Thanks.
0
 
GRayLCommented:
I think this:

me.parent.CatAPSColorSize.Form!SumGD

should be:

me.parent!CatAPSColorSize.Form!SumGD
0
 
GRayLCommented:
I spent the last hour chasing this one down - intriguing problem.  This works on my test form named frm2Subs

=Forms("frm2Subs")![sfmFox].[Form]![txtFox].[Value]

Transposed for your situation:

=Forms("Cat")!CatAPSColorSize.Form!SumGD.Value

Apparently Me! loses validity when you refer to a 'different' form.
0
 
GRayLCommented:
Thanks, glad to help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now