Sum Iff Function

  • Thread starter Thread starter Hagan
  • Start date Start date
H

Hagan

I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
 
There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

Klatuu said:
What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


Hagan said:
I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
Okay, so where is the code and what are Monthly Limit and Total Points?

--
Dave Hargis, Microsoft Access MVP


Hagan said:
There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

Klatuu said:
What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


Hagan said:
I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
The monthly limit and total points are in a table in the db. I'm not sure
where to get the code. I just can't get it to grand total.
Hagan said:
There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

Klatuu said:
What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


:

I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
The Iif statement you posted. Is it in a query, a form, on a report, in VBA
code, A macro?
--
Dave Hargis, Microsoft Access MVP


Hagan said:
The monthly limit and total points are in a table in the db. I'm not sure
where to get the code. I just can't get it to grand total.
Hagan said:
There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

:

What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


:

I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
In a report.

Klatuu said:
The Iif statement you posted. Is it in a query, a form, on a report, in VBA
code, A macro?
--
Dave Hargis, Microsoft Access MVP


Hagan said:
The monthly limit and total points are in a table in the db. I'm not sure
where to get the code. I just can't get it to grand total.
:

There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

:

What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


:

I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
Okay. First Total Points and Monthly Limit must be fields in the report's
record source. The expression you are using appears to be valid, so that is
the only thing I can think of that would cause it to ask you to enter them.
If you have controls on your report with the same name, you should rename
them so the report wont get confused.
--
Dave Hargis, Microsoft Access MVP


Hagan said:
In a report.

Klatuu said:
The Iif statement you posted. Is it in a query, a form, on a report, in VBA
code, A macro?
--
Dave Hargis, Microsoft Access MVP


Hagan said:
The monthly limit and total points are in a table in the db. I'm not sure
where to get the code. I just can't get it to grand total.

:

There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

:

What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


:

I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
I think you may have found the error. Thanks for the help, I'll let you know
if it works.

Klatuu said:
Okay. First Total Points and Monthly Limit must be fields in the report's
record source. The expression you are using appears to be valid, so that is
the only thing I can think of that would cause it to ask you to enter them.
If you have controls on your report with the same name, you should rename
them so the report wont get confused.
--
Dave Hargis, Microsoft Access MVP


Hagan said:
In a report.

Klatuu said:
The Iif statement you posted. Is it in a query, a form, on a report, in VBA
code, A macro?
--
Dave Hargis, Microsoft Access MVP


:

The monthly limit and total points are in a table in the db. I'm not sure
where to get the code. I just can't get it to grand total.

:

There is no actual error, I'm just asked to supply the Monthly Limit and the
Total Points, but I can't as each item has a different points value and a
different monthly limit.

:

What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
--
Dave Hargis, Microsoft Access MVP


:

I'm trying to use an Iif function between two columns that are populated in
the db. The lines total across, but when I try to grand total them att he
bottom, I get asked for more information or get an error.

=Sum(IIf([Monthly Limit]>[Total Points],[Total Points],[Monthly Limit]))
 
Back
Top