Sum Iff Function

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]))
 
K

Klatuu

What error?
What are you asked for?
Where is this code?
More detail makes it easier to help with an answer.
 
H

Hagan

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]))
 
K

Klatuu

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]))
 
H

Hagan

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]))
 
K

Klatuu

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]))
 
H

Hagan

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]))
 
K

Klatuu

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]))
 
H

Hagan

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]))
 

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