Sum in report footer (1 Viewer)

gcormier

Registered User.
Local time
Today, 09:05
Joined
May 31, 2000
Messages
13
The following snippet appears in the detail portion of a report of mine. Basically it says: if a customer has a balance due that is over 30 days but less than 60 days old, show it here. I would like to total all of these in the footer but have no idea how to make that happen... thoughts? Many thanks in advance.

=IIf((DateDiff("d",[Enroll Date],Now()))<60,IIf((DateDiff("d",[Enroll Date],Now()))>29,[txtBalanceDue],""))
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 03:05
Joined
Feb 28, 2001
Messages
27,321
Don't do it quite this way.

In the detail record, make an invisible field that contains that string as a recordsource. Possibly in the query from which that is derived. But instead of ending with ... [txtBalanceDue], ""....

make the query contain your expression, end it with ... CCur([balancedue],CCur("0.0") ...

The idea is that you want a currency field actually in the query. Then just compute a normal total of the complex field in the query.

In other words, make the problem easier for yourself by making the query provide the corrected detail values ahead of time. Then it is a trivial problem of doing a footer-total of a "normal" field.
 

gcormier

Registered User.
Local time
Today, 09:05
Joined
May 31, 2000
Messages
13
Thanks...

I should have thought of that.... many thanks!
 

Users who are viewing this thread

Top Bottom