Report Footer - IIf Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

I have searched through the forums for answers as to why I might be getting
an error with the following function but I can't seem to get it regardless of
what I try. I am hoping that a fresh set of eyes can spot what I hope is a
minor mistake.

My report is based on a single query and has a report footer that sums the
totals of 7 columns present in the detail section. I originally just had a
simple Sum function working but then I noticed when I queried data from a
Date with no supporting data that I received the #ERROR statement in the
field.

I tried a couple of suggestions from this forum:

=DSum("[Energy]","tblDailyLogSummaryAll","Sum([Energy]) > 0")

and

=IIf(Sum([Energy]) Is Null,0,Sum([Energy]))

but neither seemed to work no matter how I worded it. My goal is to simply
check to see if the column is equal to zero. If so, it should write a zero
in the report footer (instead of displaying #ERROR).

Thanks in advance for any assistance.

Lance
 
I'm not sure what you mean by "column". Are you referring to a field for
multiple records in a continuous form? Are you using running sum to find a
total for one field from several records? Could you just set the default
value to 0, either in the table or in a control?
 
Back
Top