Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine Record count of query to suppress #error msg in report

Status
Not open for further replies.

boysrus

Programmer
Jul 9, 2001
12
0
0
US
I have a report that has a calculated field based on its sub-report. The sub-report is based on a query. When the query produces NO records, the calculated field in the main report shows #error. Couldn't I use code in the main report to determine if the query (within the sub-report) will generate records or not. Then if the query produces zero records, I can place zero in the calculated field in the main report. Any idea what the code would be? Should I use recordsets? If so, I am not familiar with the coding. Thanks.
 
Could have sworn I'd answered this elsewhere, look up help on the HasData method, you will find examples.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top