IIF range statement

S

Somecallmeosh

Hello,

I have a field in the detail section of my report called
[TotalErrors]

In this section I've created multiple IIF statements to
help determine the range of Total Errors. For example

=IIf([TotalErrors]=0,"1","")
=IIf([TotalErrors]>20,"1","")

I am having difficulty setting this statement up to
account for numbers within a range: Example

=IIf([TotalErrors]>5<=10,"1","")

My intent is to do a count on each one of these unbound
text boxes to find out the number of items with zero
erros, those with 1 to 5 errors, and so on. The first
two presented here seem to work fine, but those that fall
into a range don't work properly. I guess my syntax is a
little off. Any help would be greatly appreciated.

Sincerely,
Josh
 
S

Somecallmejosh

Thank you Lynn,

I'm still a little bit stuck on the project:
As stated earlier, I have this in the detail section of
my report. I would like to do a running sum of all of
the unbound text boxes. I've tried to add these running
sums in the report and page footers but have been
unsuccessful. I created another unbound text box that
uses the boxes with the IIf statements as the control
source and did the running sum on them. Again,
unsuccessful.

Any ideas? Should I be summing them, as to add up all
the "ones" from the IIF statement? Or am I on the right
track by doing a count on them? Where should the running
sums be placed on the report?

Sincerely,
Josh


-----Original Message-----
=IIf(([TotalErrors]>5) AND ([TotalErrors]) <=10,"1","")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Hello,

I have a field in the detail section of my report called
[TotalErrors]

In this section I've created multiple IIF statements to
help determine the range of Total Errors. For example

=IIf([TotalErrors]=0,"1","")
=IIf([TotalErrors]>20,"1","")

I am having difficulty setting this statement up to
account for numbers within a range: Example

=IIf([TotalErrors]>5<=10,"1","")

My intent is to do a count on each one of these unbound
text boxes to find out the number of items with zero
erros, those with 1 to 5 errors, and so on. The first
two presented here seem to work fine, but those that fall
into a range don't work properly. I guess my syntax is a
little off. Any help would be greatly appreciated.

Sincerely,
Josh


.
 
L

Lynn Trapp

Have you tried putting your IIF() statements in the queries that are the
record source for your report? Then you could simply do a running sum of
field from the query. You do a running sum either in the detail section or
in the Group header or footer. I don't believe you'll get any results on the
page footer and the Report footer should only contain an overall sum.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Somecallmejosh said:
Thank you Lynn,

I'm still a little bit stuck on the project:
As stated earlier, I have this in the detail section of
my report. I would like to do a running sum of all of
the unbound text boxes. I've tried to add these running
sums in the report and page footers but have been
unsuccessful. I created another unbound text box that
uses the boxes with the IIf statements as the control
source and did the running sum on them. Again,
unsuccessful.

Any ideas? Should I be summing them, as to add up all
the "ones" from the IIF statement? Or am I on the right
track by doing a count on them? Where should the running
sums be placed on the report?

Sincerely,
Josh


-----Original Message-----
=IIf(([TotalErrors]>5) AND ([TotalErrors]) <=10,"1","")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Hello,

I have a field in the detail section of my report called
[TotalErrors]

In this section I've created multiple IIF statements to
help determine the range of Total Errors. For example

=IIf([TotalErrors]=0,"1","")
=IIf([TotalErrors]>20,"1","")

I am having difficulty setting this statement up to
account for numbers within a range: Example

=IIf([TotalErrors]>5<=10,"1","")

My intent is to do a count on each one of these unbound
text boxes to find out the number of items with zero
erros, those with 1 to 5 errors, and so on. The first
two presented here seem to work fine, but those that fall
into a range don't work properly. I guess my syntax is a
little off. Any help would be greatly appreciated.

Sincerely,
Josh


.
 

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