adding value in text boxes on report

  • Thread starter Thread starter don
  • Start date Start date
D

don

hi

i have a report that returns a numeric value in seven
different boxes. i have seven associated boxes that
returns a letter. i would like to return a value adding
the first seven baised on the letter in the associated box
in a total textbox. there will be different total boxes
for different letters.

thanks.
 
don said:
i have a report that returns a numeric value in seven
different boxes. i have seven associated boxes that
returns a letter. i would like to return a value adding
the first seven baised on the letter in the associated box
in a total textbox. there will be different total boxes
for different letters.


What are the names of all these text boxes?

How does each "letter" text box "bias" it's related numeric
value?

Some sample letters and values might also help us understand
what you're trying to accomplish.
 
i finally got it to work using

=IIf([typefri1]="r",[fri1],0)+IIf([typefri1a]="r",
[fri1a],0)+IIf([typefri1b]="r",[fri1b],0)+IIf([typesat1]
="r",[sat1],0)

in the control sorce

typfri1 is the letter
fri1 is the number
it works but you might know of a shorter way maybee?

thanks
 
don said:
i finally got it to work using

=IIf([typefri1]="r",[fri1],0)+IIf([typefri1a]="r",
[fri1a],0)+IIf([typefri1b]="r",[fri1b],0)+IIf([typesat1]
="r",[sat1],0)

in the control sorce

typfri1 is the letter
fri1 is the number
it works but you might know of a shorter way maybee?


With that kind of expression, that's the straightforward way
to do it.

Because of lack of clarity, I don't usually recommend this,
but you can make it a little shorter/faster with:

= -(typefri1="r") * fri1 - (typefri1a="r") * fri1a -
(typefri1b="r") * fri1b - (typesat1="r") * sat1
 
i have a database for keeping time worked

the r stands for regular time
i use a combo box for the user to choose between reg
vacation sick leave and so on that is the typefri1 feild
and the fri1 field represents the hours. i have seven
combinations for the week. i am trying to get totals for
week based on the letter.

your formula works also

thanks for your input

don
-----Original Message-----
don said:
i finally got it to work using

=IIf([typefri1]="r",[fri1],0)+IIf([typefri1a]="r",
[fri1a],0)+IIf([typefri1b]="r",[fri1b],0)+IIf([typesat1]
="r",[sat1],0)

in the control sorce

typfri1 is the letter
fri1 is the number
it works but you might know of a shorter way maybee?


With that kind of expression, that's the straightforward way
to do it.

Because of lack of clarity, I don't usually recommend this,
but you can make it a little shorter/faster with:

= -(typefri1="r") * fri1 - (typefri1a="r") * fri1a -
(typefri1b="r") * fri1b - (typesat1="r") * sat1
 
Back
Top