View Full Version : #error on main report


sloaner14
02-25-2004, 02:13 PM
I have a report that has one subreport. On the subreport I have a text box that will count the records in that subreport. I have a control on my main form that pulls that number out of the subreport. This works fine until I have a subreport with nodata, and then my text box displays #Error. I have code that hides the subreport when there is nodata. I want to know how to get the main form control to display 0, not #Error. Any ideas would be great.

Kraj
02-25-2004, 02:15 PM
I believe the Nz function can be used to return a value when the control is null. I haven't worked with it much, though.

Rich
02-25-2004, 02:25 PM
Search here for the HasData method, the Nz Function will not work in this instance