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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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.
 
Upvote 0
I did something similar and it had this format:

=[ACTUAL FEET Subform]!Text8
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,217
Members
448,554
Latest member
Gleisner2

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
Back
Top