Dsum in Detail

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

Guest

I need to do a calculation with a Dsum function in the detail section of a
report. I actually need to use the Dsum function twice. One Dsum will
calculate a total based on another field's value in the report, but the other
Dsum will generate a number that will be static, or constant. It will
generate the same total for the entire report, although different each time
the report is run.

How do I keep from having to run the second Dsum function for each detail?
Can I put ut somewhere else in the code and send it to the Format_Detail
event?

Thanks in advance.

DEI
 
Yes, place the 2nd DSum() text box into the Report Header section, so it
calculates at the start.

You can then set your text box to:
=[Text0]
or whatever is the name of the hidden box in the report header.

If the report is still slow to execute, you might consider using a subquery
in the report's source query instead of a DSum(). More info:
How to Create and Use Subqueries
at:
http://support.microsoft.com/?id=209066
 
Back
Top