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



The information in this article applies to:

  • Microsoft Access 1.0
  • Microsoft Access 1.1
  • Microsoft Access 2.0
  • Microsoft Access for Windows 95 7.0

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.

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.

Modification Type:MajorLast Reviewed:5/9/2003
Keywords:kbinterop kbprb KB95441