Re: Most Interesting Anomaly



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

"Rick Brandt" <rickbrandt2@xxxxxxxxxxx> wrote in message
news:qOBLi.53232$Um6.39478@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Bill wrote:
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

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.

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



.