#error on main report

sloaner14

Registered User.
Local time
Today, 16:09
Joined
Apr 25, 2002
Messages
32
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.
 
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.
 
Search here for the HasData method, the Nz Function will not work in this instance
 

Users who are viewing this thread

Back
Top Bottom