This is actually related to my last question (about getting a count result to show up by itself on a report). I got the count results to show up like I wanted by adding a subreport with a COUNT function in its footer and then making the rest of the subreport invisible. Now the problem is that I can't get the COUNT function to return 0 when the query it is counting has no records. I'm not using a WHERE clause with the COUNT, because I want it to count all the records in a specified query. I have tried to use IIf, ISNULL, IFNULL, and Nz, and none will work. I created a form with the same data source as a subreport I'm working with, and in the footer of the form I added a text box with this expression: =Nz(Count([EmpID])), 0).
It worked and returned a zero on the form, but the same exact syntax returns nothing or an error on a report built the same way.
Help?
It worked and returned a zero on the form, but the same exact syntax returns nothing or an error on a report built the same way.
Help?
Comment