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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display "None" when query results in no records 1

Status
Not open for further replies.

stotzc001

Technical User
Mar 27, 2003
30
US
I have a personnel database that produces an end of month report with different lists such as Evaluations Due, and Sick Days Taken. It is based of specific queries that I have written. All the lists are subreports linked to the main report. The problem I have is when the queries return no records I want the query to display "None" instead of just being null. I have seen it done before in access but I cant find an example.
 
You can add a text box in the main report with a control source like:
=IIf(srptA.Report.HasData, "","No Evaluations Due")

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Duane,

How would I get that control to be in place of the subreport? The main report looks like this.
---
1. The following personnel have not completed the required monthly training:

[Subreport] Employee 1
Employee 2

2. The following personnel are due for performance rewiews:

[Subreport] None
--------
I figured it would be easiest just to code each query to say "None" if the select query resulted in a null.
 
Place it behind or over the subreport. It should not display if there is data in the subreport. If the subreport is blank, the subreport should not display.

I don't know how easy it would be to get a query that doesn't return any results to return "none". Ain't gonna happen without a lot of work.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top