Link to home
Start Free TrialLog in
Avatar of jdfuller
jdfullerFlag for United States of America

asked on

Suppress #Error result in Access reports

I have multiple nested reports whereby all the final sums of the individual reports roll up into fields on the report footer.  If any one report has no data an #Error shows in the roll-up sums even though the report doesn't show at all.  Either I'd like to Nz() all the fields on the sub reports so that the sums are zero or Nz() the roll-up fields so that the #Error does not show and the field can be used in calculating the grand total.  One #Error ripples through the results and I get no Grand Total because ONE field is empty or one row is empty.
Avatar of Bradley Haynes
Bradley Haynes
Flag of United States of America image

Use this function it is from Excel but behind it all is VBA: modify for your code what is important is the [=If(IsError] part.

=If(IsError(VLOOKUP(B29,exchange,2)),"",VLOOKUP(B29,exchange,2))
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdfuller

ASKER

Peter:  I think you are on it.  I will try your solution first tomorrow (PST) and get back to you asap on the points.  If you are correct, I'll have to do that for each control that is looking for a sub report field - 48ea.  I'm sure the first field will be telling enough to say whether the solution will work or not.  Copy and paste (and edit), man!  Thanks, guys.
Right on, Peter!  Thanks.  Sorry for the wait on the points. :o)