ACC95: Sum() Function Returns 0 in Report Output to MS Excel

Last reviewed: June 3, 1997
Article ID: Q154396
The information in this article applies to:
  • Microsoft Access version 7.0

SYMPTOMS

Advanced: Requires expert coding, interoperability, and multiuser skills.

When you output a Microsoft Access report that uses the Sum() function to Microsoft Excel, the result of the calculation in the Microsoft Excel spreadsheet is zero (0).

RESOLUTION

To work around the problem, change the following properties of the bound control being summed (not the text box containing the Sum() function) to the following settings:

   Format: Fixed
   Decimal Places: Desired number of decimal places

NOTE: The report must be analyzed again for the changes to take effect.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 7.0. This problem no longer occurs in Microsoft Access 97.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb and use the Report Wizard to create an Auto Tabular report based on the Shippers table.

  2. In the report footer, add a text box with the following properties:

          Text box:
    
             Name: test
             ControlSource: =sum([ShipperID])
    
    

  3. Click "Analyze it With MS Excel" in the Office Links box on the toolbar.

  4. When the Microsoft Excel document opens, note that the last value in the ShipperID column (corresponding to the sum function) is 0.

REFERENCES

For more information about using the Sum() function, search for "Sum function," and then "Computing a total for a calculated control on a form or report" using the Microsoft Access for Windows 95 Help Index.


Keywords : IntpOff kbinterop
Version : 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.