Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Access
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
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.
  3. Click in the form where you want to create the text box.
  4. Right-click the text box and then click Properties.
  5. In the Property Sheet task pane, click the All tab.
  6. 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

advertisement