Information sharing between a Subform and form

hattrix86

New Member
Joined
Jul 30, 2007
Messages
3
I created a subform on my main form, and in this subform is a text box that sums up one of the feilds. I created the subform to obtain this sum, and need it to appear in a text box on my main form.

Since i dont need any of the other info from the subform, i have its visibility turned off and in the text box on my main form i have the control source set to:

=Forms![ACTUAL FEET Subform]!Text8

ACTUAL FEET subform is obviously the name of my subform and Text8 is the name of the text box that i need to copy on the subform.

It is currently giving me the #Name? error in the text box on the main form.

Any ideas on how to fix this?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

hattrix86

New Member
Joined
Jul 30, 2007
Messages
3
Error message

It gave me the error message:

The object you referenced in the visual basic procedure as an OLE object isn't an OLE object.
 

LxQ

Well-known Member
Joined
Feb 9, 2006
Messages
619
I did something similar and it had this format:

=[ACTUAL FEET Subform]!Text8
 

VicRauch

Well-known Member
Joined
Mar 23, 2006
Messages
2,032
Because you are referencing this from your main form, you should be able to start with the name of the SubForm Control, not the name of the sub form. Quite often the name of the SubForm Control and the subform are the same, but not always, so check the name of the SubForm Control. To do this, while in Design view, click the subform once. That should select the SubForm Control. If Properties is not open, open the Properties window and check the name. Also check the name of the form that is used for the subform by looking at the SourceObject property in the SubForm Control.

When you are sure of the SubForm Control name, you can format the ControlSource for the text box on your main form this way:
=[SubForm Control Name].Form!Text8

HTH
 

Forum statistics

Threads
1,181,053
Messages
5,927,848
Members
436,572
Latest member
khalid hussain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top