Store value

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

In my detail section, in a textbox, control source:

=IIf([EarningCode]="01" Or [EarningCode]="OT",[Amount],Null)

If either earning code shows up, amount displays with description ("01
Overtime 550.00")

Two questions: How can I store totals of codes 01 and OT of the above IIF
statement for use in group and final totals. I am thinking I need to DIM
something as Currency? and how do I refer to it in totals?

Second question: Description of all earnings codes print. IIF statement
allows for only amounts of codes 01 and OT to print. How can I suppress
printing of descriptions for non 01 and 0T codes?

thanks
 
1) you don't want or need to "store" anything. If you want to total the
Amount, use an expression like:
=Abs( Sum( ([EarningCode]="01" Or [EarningCode]="OT") * [Amount]))
2) I have no idea how your report is set up. Can't you just set the criteria
of your report to exclude specific Descriptions or Codes?
 
Back
Top