total #Error message

  • Thread starter Thread starter chrismontora
  • Start date Start date
C

chrismontora

Guest
How can I override (with a value, 0 for example) the "#Error" message for a total field when i don't have any records to sum?
 
If there are no records in the report - look up "On No Data" property

Col
 
I use this:

=IIf(IsError([field]),0,[field])

put this in the control source of your sext box
 
Is not working for me with the IIf.
I have a simple report with a total at the end (=Sum([Amount]))
When I have no records it displays #Error

I tried =IIf(IsError(Sum([Amount])),0,Sum([Amount])) but it still shows #Error when no records are selected in my report.

ColinEssex: How can I override this on NoData? An example would be great.
 
The Report collection also has a HasData property.

If (Me.HasData) Then
' Blah Blah Blah
Else
' No Blah
End If

Reports are fickle and just where you test for the data could vary.
 
Are you saying that your report has no underlying records at all?
 

Users who are viewing this thread

Back
Top Bottom