Microsoft KB Archive/95441

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

Article ID: 95441

Article Last Modified on 5/9/2003

-

APPLIES TO


 * Microsoft Access 1.0 Standard Edition
 * Microsoft Access 1.1 Standard Edition
 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition

-



This article was previously published under Q95441



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.



Steps to Reproduce Behavior
 Start Microsoft Excel and create a new worksheet. Place the text &quot;This is a test&quot; (without the quotation marks) in row 1, column 1. Save this worksheet as Ddetest.xls, and leave this worksheet open.  In Microsoft Access, create the following new table:

     Table: Table1 ---     Field Name: TXT Data Type: Text  Create a new report based on the Table1 table. Add a text box bound to the TXT field by dragging TXT from the field list to the report.  Add an unbound text box to the report and set the text box's ControlSource property to the following expression: <pre class="fixed_text">     =DDE(&quot;Excel&quot;,&quot;DDEtest.xls&quot;,&quot;R1C1&quot;) </li> Save the report as SubRep, and then view the SubRep report in Print Preview. Note that &quot;This is a test&quot; is displayed correctly.</li> 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.</li> View the MainRep report in Print Preview. Note that &quot;This is a test&quot; is not visible on the report. Close the MainRep report.</li> Open the Table1 table and add some data to it. View the MainRep report in Print Preview. Note that &quot;This is a test&quot; is now visible.</li></ol>

Keywords: kbinterop kbprb KB95441

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.