ACC2000: "#ERROR" Message When Referencing Subreport Controls (208718)
The information in this article applies to:
This article was previously published under Q208718 Moderate: Requires basic macro, coding, and interoperability skills.
For a Microsoft Access 2002 version of this article, see 288251.
SYMPTOMSThis article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
If you reference a subreport control from a main report when the subreport
does not return any matching records, you may receive the following message
#ERROR
for the referenced subreport control.
NOTE: This article explains a technique demonstrated in the sample
files, RptSmp00.exe. For information about how to obtain these sample files, please see the following articles in the
Microsoft Knowledge Base:
231851
ACC2000: Microsoft Access 2000 Sample Reports Available in Download Center
CAUSE
When the subreport has no data, it is not available. Referencing an empty
subreport results in an invalid operation.
RESOLUTION
Make sure that subreport fields referenced in a main report contain data by
adding a function to test for this condition. See the "Steps to Reproduce
Behavior" and "Steps to Work Around Behavior" sections later in this
article for an example of such a function.
REFERENCESFor more information about the HasData property, click Microsoft Access Help on the Help menu, type HasData property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kberrmsg kbprb KB208718 |
---|
|