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
- 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.
- 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:
=DDE("Excel","DDEtest.xls","R1C1")
- Save the report as SubRep, and then view the SubRep report in Print
Preview. Note that "This is a test" is displayed correctly.
- 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.
- View the MainRep report in Print Preview. Note that "This is a test" is
not visible on the report. Close the MainRep report.
- 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.
|