ACC: Subreport Based on Table or Query Does Not Show DDE Data

Last reviewed: July 18, 1997
Article ID: Q95441
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0

SYMPTOMS

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

When you view a report in Print Preview or print the report, the result of a dynamic data exchange (DDE) expression in a subreport is not displayed.

CAUSE

If the subreport is based on a table or query, there must be at least one row of data in the underlying table or recordset before the subreport's DDE data will be displayed.

RESOLUTION

There are three possible resolutions:

  • Hide the DDE expression if the recordset for the subreport is empty.
  • Place the DDE expression in a subreport not based on a table or query.
  • Place the control that contains the DDE expression in the main report.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Excel and create a new worksheet. Place the text "This is a test" (without the quotation marks) in row 1, column 1. Save this worksheet as Ddetest.xls, and leave this worksheet open.

  2. In Microsoft Access, create the following new table:

          Table: Table1
          ---------------
          Field Name: TXT
          Data Type: Text
    

  3. Create a new report based on the Table1 table.

  4. Add a text box bound to the TXT field by dragging TXT from the field list to the report.

  5. Add an unbound text box to the report and set the text box's ControlSource property to the following expression:

          =DDE("Excel","DDEtest.xls","R1C1")
    

  6. Save the report as SubRep, and then view the SubRep report in Print Preview. Note that "This is a test" is displayed correctly.

  7. Close the SubRep report and create a new report. Drag the Subrep report from the Database window to this new report. Save this report as MainRep.

  8. View the MainRep report in Print Preview. Note that "This is a test" is not visible on the report. Close the MainRep report.

  9. Open the Table1 table and add some data to it. View the MainRep report in Print Preview. Note that "This is a test" is now visible.


Keywords : IntpDde kbinterop RptSub
Version : 1.0 1.1 2.0 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbworkaround


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: July 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.