Create a control that references a control on another form

This article describes you how to add a text box control to a form, and then set the properties for that text box so that it displays a value from a control on another form. This is useful in the following situations:

  • You have a main form that contains a subform; the subform contains a calculated text box (for example, a total of item prices), the results of which you want to display on the main form.
  • You have a form that contains a command button that opens a second form, and you want a text box on the second form to display the value of a control on the first form.

Create the control

  1. In the Navigation Pane, right-click the form that you want to change, and then click Design View.
  2. On the Design tab, in the Controls group, click Text Box.
  1. Click in the form where you want to create the text box.
  2. Right-click the text box and then click Properties.
  3. In the Property Sheet task pane, click the All tab.
  4. Set the Control Source property using the following syntax:

=[form name].Form![control name]

Where form name is the name of the form that contains the control whose value you want to display, and control name is the name of the control.

Example

Suppose that you have a main form named Orders. This form contains a subform named Orders Subform, and the subform contains a calculated text box named OrderSubtotal. To display the value from the OrderSubtotal control on the Orders main form, you would add a text box to the Orders main form and specify its Control Source property as follows:

=[Orders Subform].Form![OrderSubtotal]

Find a link to more information about how to create a calculated control in the See Also section.

Top of Page Top of Page

 
 
Applies to:
Access 2007