Sep 6 2005, 03:44 AM
I am putting a report together that simply gives a total of how many records the query generates. The problem is when there are no records I get #Error in the control. Is there a way of getting zero to appear when there aren’t any records to count.
Sep 6 2005, 05:50 AM
Sep 6 2005, 05:58 AM
Thanks fr the reply. I'm getting an error with that one something about brackets.
Sep 6 2005, 06:04 AM
I think it should be this when i've checked it.
The brackets always give me trouble.
Hope it works this time!
Sep 6 2005, 06:07 AM
Thanks it took it this time but it still shows #Error when there are no records. Thanks for the help.
Sep 6 2005, 06:33 AM
I think i've hopefully found the answer:
=IIf([clientID] Is Null,0,Count([clientid]))
If not then i've found a way around it which will make your count control's visible property set to No, therefore making it invisible. You will need to put this code in the report's open event.
If DCount("clientid", "YOURTABLENAME") = 0 Then
YOURCOUNTCONTROL.Visible = False
Give it a try and if it still doesn't work let me know.
Edited by: Rammy on Tue Sep 6 7:39:48 EDT 2005.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here