#Error from Subreport fields

Randomblink

The Irreverent Reverend
Local time
Today, 11:40
Joined
Jul 23, 2001
Messages
279
I have a subreport on a main report.

SubreportName:subrpt_ContractAmendments
MainReportName:rpt_Green_Book

The subreport has 4 fields.
Field#1:[AMNDNO]- Amendment Number (ie 1,2,3,4...)

Field#2:[AMDAMT]- Amendment Amount (Currency)

Field#3:[AMDJSTCN]- Just a text description field

Field#4:[Accumulative_Amendment]- An unbound field that Sums the Amendment Amount field - .ControlSource (=Nz(Sum([AMDAMT]),0)

On my main report, I have a field that is called Accumulative Amendments (FieldName:AccAmnd) that has the recordsource set to:
[subrpt_ContractAmendments].Report![Accumulative_Amendment]

Well, what happens is...If a record on the main report has NO entries in the subreport (IOW No amendments) then I get an "#Error" entry in my [AccAmnd] field.

I have tried everything from Select Case to Iif Statements to stop this...I have read everything the Help Pages have to offer...What am I doing wrong???!

HELP US OBI WON KENOBI, YOUR OUR ONLY HOPE...
 
=IIF([SubRpt].Report.HasData=True, [SubRpt].Report![SomeField], 0)
 

Users who are viewing this thread

Back
Top Bottom