ACC1x: Calculated Control on Subreport Displays Wrong Data

ID: Q98667


The information in this article applies to:


SYMPTOMS

A calculated control on your subreport shows incorrect data for the first record of alternate pages in the report.


RESOLUTION

Change the CanGrow or the LinkChild and LinkMaster properties of the calculated control so that either


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem no longer occurs in Microsoft Access version 1.1.


MORE INFORMATION

This problem occurs only with non-linked subreports when the calculated control's CanGrow property is set to Yes. This is not a problem with linked subreports.

Steps to Reproduce Problem

The example below only works in Microsoft Access version 1.0. This example uses the sample database NWIND.MDB:
  1. Create a new report based on the Categories table. Add all the fields from the Categories table to the report and leave the report open in Design view.


  2. Select the Category ID text box, and modify its properties as follows:
    
          Object: text box
          --------------------------------
          ControlName: Category IDx
          ControlSource: =[Category ID]
          CanGrow: Yes 


  3. Save this report as Sub and then close it.


  4. Create a new, unbound report. Drag the Sub report from the Database window onto the new report. Save the new report as Main.


  5. Preview the Main report. Note that the Category ID field of the first record on the Sub report shows the wrong Category ID for the record.



Keywords          : kbusage RptSub 
Version           : 1.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: March 23, 1999