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 / September 2007

Tip: Looking for answers? Try searching our database.

Most Interesting Anomaly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill - 30 Sep 2007 00:44 GMT
I've encountered a most interesting anomaly
in A2003 Reports. I have a report containing
two columns. The Detail_Format event is triggered
twice at the beginning of each column. And,
since I'm doing some calculations on each
record being formatted, my calculation totals
are incorrect by exactly the amount reflected
in the records corresponding to those that fall
at the top of each column. Needless to say, it
took a bit of debugging to finally trace the
source of the problem.

Is there some explanation as to why the event
"fires" twice when a new column begins?

I can keep track of RecordID's to detect when
this is happening, but I suspect there's a better
way to know what's happening?

Thanks,
Bill
Rick Brandt - 30 Sep 2007 01:08 GMT
> I've encountered a most interesting anomaly
> in A2003 Reports. I have a report containing
[quoted text clipped - 17 lines]
> Thanks,
> Bill

Formatting events in reports fire multiple times for lots of reasons.  Some
times many more times than just twice.  You cannot use these event to reliably
perform calculations.

Usually controls with their RunningSum property enabeled an be used to perfom
such calculations and they don't have the same problems.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Bill - 30 Sep 2007 01:49 GMT
Thanks Rick,
I'll keep what you've said in mind for next time. As it
is now, it's easier, for what might very well turn out
to be some throw-away code, to simply track the
RecordID's in the event such they don't get processed
twice. The reason I've never hit this before is because,
as you've already suggested, I use the sum functions
of reports to keep the running totals.
Thanks again,
Bill

>> I've encountered a most interesting anomaly
>> in A2003 Reports. I have a report containing
[quoted text clipped - 24 lines]
> Usually controls with their RunningSum property enabeled an be used to
> perfom such calculations and they don't have the same problems.
 
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.