Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / January 2006

Tip: Looking for answers? Try searching our database.

Dsum in Detail

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DEI - 05 Jan 2006 21:16 GMT
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  
Allen Browne - 06 Jan 2006 01:05 GMT
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

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>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
[quoted text clipped - 12 lines]
>
> DEI
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.