IIF Statement to Count Specific Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report which lists computer records and whether they have dial up,
highspeed, or networked. I need to count the number of records in each of
these groups at the bottom of the report. I want to make IIF statements.

IIF [connection] ="highspeed",count of highspeed

Can someone help with the syntax?

Thanks
 
I have a report which lists computer records and whether they have dial up,
highspeed, or networked. I need to count the number of records in each of
these groups at the bottom of the report. I want to make IIF statements.

IIF [connection] ="highspeed",count of highspeed

Can someone help with the syntax?

Thanks

In the Report Footer, add an unbound control.
Set it's control source to:

=Sum(IIf([Connection]= "highspeed",1,0)

Use a similar expression for each of the other choices.
 
Fred: Thanks so very much. Worked beautifully. I did have to add a close ) to
the end. Thanks again for your help. I've been working on this all night and
all morning and in 5 minutes you saved me!


fredg said:
I have a report which lists computer records and whether they have dial up,
highspeed, or networked. I need to count the number of records in each of
these groups at the bottom of the report. I want to make IIF statements.

IIF [connection] ="highspeed",count of highspeed

Can someone help with the syntax?

Thanks

In the Report Footer, add an unbound control.
Set it's control source to:

=Sum(IIf([Connection]= "highspeed",1,0)

Use a similar expression for each of the other choices.
 
Fred - thanks, I read your solution and it worked for me also!

TinleyParkILGal said:
Fred: Thanks so very much. Worked beautifully. I did have to add a close ) to
the end. Thanks again for your help. I've been working on this all night and
all morning and in 5 minutes you saved me!


fredg said:
I have a report which lists computer records and whether they have dial up,
highspeed, or networked. I need to count the number of records in each of
these groups at the bottom of the report. I want to make IIF statements.

IIF [connection] ="highspeed",count of highspeed

Can someone help with the syntax?

Thanks

In the Report Footer, add an unbound control.
Set it's control source to:

=Sum(IIf([Connection]= "highspeed",1,0)

Use a similar expression for each of the other choices.
 
Thanks your solution worked for me also.
Can you explain why it works when Sum is used before the IIF statement. It
didn't work stating (IIF[value]="yes",sum[Yearly Value],0) - just an example,
as it was something like that.
But it wouldn't work until I put Sum infront of the IIF statement like you
suggested. Didn't know if there was any rhyme or reason to why it is to be
done that way. Just thought I would inquire. Thanks again for your helpful
post.

fredg said:
I have a report which lists computer records and whether they have dial up,
highspeed, or networked. I need to count the number of records in each of
these groups at the bottom of the report. I want to make IIF statements.

IIF [connection] ="highspeed",count of highspeed

Can someone help with the syntax?

Thanks

In the Report Footer, add an unbound control.
Set it's control source to:

=Sum(IIf([Connection]= "highspeed",1,0)

Use a similar expression for each of the other choices.
 
This almost works for me but I need to *expr1 to the results of that
statement, but i can't get it to work for me. Below is the statement I have,
could you please help me:
=Sum(IIf([expr4]="1",1,0))*[expr1]

_ said:
Thanks your solution worked for me also.
Can you explain why it works when Sum is used before the IIF statement. It
didn't work stating (IIF[value]="yes",sum[Yearly Value],0) - just an example,
as it was something like that.
But it wouldn't work until I put Sum infront of the IIF statement like you
suggested. Didn't know if there was any rhyme or reason to why it is to be
done that way. Just thought I would inquire. Thanks again for your helpful
post.

fredg said:
I have a report which lists computer records and whether they have dial up,
highspeed, or networked. I need to count the number of records in each of
these groups at the bottom of the report. I want to make IIF statements.

IIF [connection] ="highspeed",count of highspeed

Can someone help with the syntax?

Thanks

In the Report Footer, add an unbound control.
Set it's control source to:

=Sum(IIf([Connection]= "highspeed",1,0)

Use a similar expression for each of the other choices.
 

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

Back
Top