H
hobbit2612 via AccessMonster.com
Hi, I wonder whether someone can help me please.
I currently have a text box with the following control source code within it:
=Sum(IIf(Not[Impact],[TotalCost],0))
Basically this takes the figure in the 'TotalCost' box on a continuous
Subform and where the tick box 'Impact' isn't ticked it takes the figure and
puts it on the main form.
What I would like to do is to add another variable from another tick box
again on the continuous subform. This time it's called 'StatusSelected' and
again where it isn't ticked I want it to take the 'TotalCost' figure and put
it on the main form, so basically the 'TotalCost' figure has to match both
criteria.
I've tried the following code:
=Sum(IIf(Not[Impact], [StatusSelected], [TotalCost],0))
But all I get is 'The expression you entered has a function containing the
wrong number of arguments.
I then tried:
=Sum(IIf(Not[Impact]&[StatusSelected], [TotalCost],0))
But all I get is an #Error in the text box containing the code.
Can anyone help me out please?
Many thanks
Chris
I currently have a text box with the following control source code within it:
=Sum(IIf(Not[Impact],[TotalCost],0))
Basically this takes the figure in the 'TotalCost' box on a continuous
Subform and where the tick box 'Impact' isn't ticked it takes the figure and
puts it on the main form.
What I would like to do is to add another variable from another tick box
again on the continuous subform. This time it's called 'StatusSelected' and
again where it isn't ticked I want it to take the 'TotalCost' figure and put
it on the main form, so basically the 'TotalCost' figure has to match both
criteria.
I've tried the following code:
=Sum(IIf(Not[Impact], [StatusSelected], [TotalCost],0))
But all I get is 'The expression you entered has a function containing the
wrong number of arguments.
I then tried:
=Sum(IIf(Not[Impact]&[StatusSelected], [TotalCost],0))
But all I get is an #Error in the text box containing the code.
Can anyone help me out please?
Many thanks
Chris