?
Solved

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

Posted on 2011-05-09
7
Medium Priority
?
328 Views
Last Modified: 2012-05-11
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
Comment
Question by:vmccune
  • 3
  • 3
7 Comments
 

Author Comment

by:vmccune
ID: 35720998
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
 
LVL 77

Expert Comment

by:peter57r
ID: 35721041
If I've understood your names correctly then...

me.parent.CatAPSColorSize.Form!SumGD

The subform name is not part of the reference.
0
 

Author Comment

by:vmccune
ID: 35721194

That gets #ERROR.

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

=[CatAPSColorSize].[Form]![SumGD]
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:vmccune
ID: 35721234
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
 
LVL 44

Expert Comment

by:GRayL
ID: 35722968
I think this:

me.parent.CatAPSColorSize.Form!SumGD

should be:

me.parent!CatAPSColorSize.Form!SumGD
0
 
LVL 44

Accepted Solution

by:
GRayL earned 2000 total points
ID: 35723618
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
 
LVL 44

Expert Comment

by:GRayL
ID: 36155774
Thanks, glad to help.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question