Summary Report / OnFormat / OnPrint

  • Thread starter Thread starter BB
  • Start date Start date

BB

Registered User.
Local time
Today, 08:13
Joined
Aug 31, 2001
Messages
30
I am doing a summary report. In an Account footer I have an AcctNumber, AcctName, etc, and a calculated total. Actually, I want to include only those accounts with a negative total. I am able to put code in the OnFormat or OnPrint event (not sure which one to use) and get a row(positive totals) not to print. However, at the end of the report I want a grand total. What I get includes the positives too. How can I handle this?

Thanks,
new to access
 
What if you put an invisible field on your report, right next to your current amount field? The control source for this field would be something like (watch the syntax, I'm guessing here
smile.gif

Iif([Amount]<0,[Amount],0)

and give it a name like Neg_Amount. Then you can do the same kind of summing on Neg_Amount that you are doing on the regular amount field. Whatever you come up with will only include the negative values.

(Remember that this field is invisible, so once you've got it working, you can shrink it down in design view, so that it's not in your way. I usually set the colors for invisible fields to something outlandish, so that whenever I come back into a report to do maintenance, they really stand out.)

[This message has been edited by Chris RR (edited 11-09-2001).]
 

Users who are viewing this thread

Back
Top Bottom