IIF Statement to Count Specific Records

T

TinleyParkILGal

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
 
F

fredg

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.
 
T

TinleyParkILGal

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.
 
G

gmead7

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.
 
K

KRB

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.
 
Top