Microsoft KB Archive/883867

From BetaArchive Wiki

Article ID: 883867

Article Last Modified on 8/29/2006



APPLIES TO

  • Microsoft Office Access 2003





This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp).

Moderate: Requires basic macro, coding, and interoperability skills.


SYMPTOMS

When you open a form that contains a subform, you may notice that the control on the form that refers to the control on the subform is blank. When you open a report that contains a subreport, you may notice that the control on the report that refers to the control on the subreport is blank.

You notice this behavior when the following conditions are true:

  • The expression in the ControlSource property for the control on the form or on the report does not provide a full reference to the control on the subform or on the subreport, respectively.

    For example, to display a value that is calculated in the OrderSubtotal control on the "Orders" subform, the following expression is entered as the ControlSource property for the Subtotal control on the "Orders" main form:

    =[Orders Subform]!OrderSubtotal
  • Sandbox mode is turned on for Microsoft Office Access 2003 applications.


RESOLUTION

To resolve this problem, you must install Microsoft Office 2003 Service Pack 1 on your computer.

The following file is available for download from the Microsoft Download Center:

WORKAROUND

To work around this problem, you must modify the ControlSource property for the control on the form or on the report. You do this to provide a full reference to the control on the subform or on the subreport, respectively.

To refer to a control on the subform, you must include the .Form identifier in the expression that is entered as the ControlSource property for the corresponding control on the main form.

For example, to display a value that is calculated in the OrderSubtotal control on the "Orders" subform, you must enter the following expression as the ControlSource property for the corresponding control on the "Orders" main form:

=[Orders Subform].Form!OrderSubtotal

Similarly, to refer to a control on the subreport, you must include the .Report identifier in the expression that is entered as the ControlSource property for the corresponding control on the main report.

For example, to display a value that is calculated in the QuarterTotal control on the "Sales by Year" subreport, you must enter the following expression as the ControlSource property for the corresponding control on the "Sales by Year" main report:

=[Sales by Year Subreport].Report!QuarterTotal

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the problem

Caution If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.

  1. Turn on Sandbox mode for Access 2003 applications. To do this, follow these steps:
    1. Start Access 2003.
    2. On the Tools menu, point to Macro, and then click Security.
    3. In the Security dialog box, click Medium on the Security Level tab, and then click OK.
    4. Close Access 2003.

    Note If the macro Security menu item is missing, you must add the menu item by customizing the toolbar.

    For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    833219 Menu items are missing after you upgrade from an earlier version of Microsoft Access to Microsoft Office Access 2003

  2. Start Access 2003.
  3. Open the Northwind.mdb sample database.
  4. In the Database window, click Forms under the Objects section.
  5. In the right pane, right-click Orders, and then click Design View.

    The Orders form opens in Design view.
  6. On the Orders form, locate, and then select the text box that is named Subtotal.
  7. On the View menu, click Properties.
  8. On the Data tab, locate the Control Source property.

    Notice that the Control Source property originally contains the following expression:

    =[Orders Subform].Form!OrderSubtotal

    On the Data tab, modify the expression in the Control Source property to the following:

    =[Orders Subform]!OrderSubtotal
  9. Save the form.
  10. On the View menu, click Form View.

    The Orders form opens in Form view.

    Notice that the value in the Subtotal box is blank.


REFERENCES

For more information about Microsoft Jet Expression Service Sandbox mode, click Microsoft Office Access Help on the Help menu, type about Microsoft Jet Expression Service Sandbox mode in the Search for box in the Assistance pane, and then click Start searching to view the topic.

For more information about referring to an object or to its properties in expressions, click Microsoft Office Access Help on the Help menu, type refer to objects in expressions in the Search for box in the Assistance pane, and then click Start searching to view the topic.



Additional query words: blank subform subreport security ACC ACC2003 ACC2K3

Keywords: kbtshoot kbbug kbforms kbreport kbdisplay KB883867