Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why the Balance value shows #Error if the subreport has no data..? 2

Status
Not open for further replies.

awinnn

MIS
Jul 21, 2003
166
MY
Hi,
I have report and subreport. This is what i have on the report.
Balance = Total - Subtotal.

The Balance is works fine if the subreport has data. The Total value is taken from the report while the Subtotal value is taken from the subreport. If the subreport has no data, the Balance will show #Error.
This is what i've done,
Balance = [Total] - nz([Subtotal])
whereby,
Subtotal = [Subreport_name].Report![total]

It doesn't work..Any idea?

Thanx..:)
 
The Subtotal control source should be set to:
Subtotal = IIf([Subreport_name].Report.HasData,[Subreport_name].Report![total],0)

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Hi Duane..
thanx for your help..it works..:)

* star for u..:D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top