Store value

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
 
D

Duane Hookom

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top