A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

countif in Access Reports



 
 
Thread Tools Display Modes
  #1  
Old March 11th, 2007, 12:55 AM posted to microsoft.public.access.reports
P T Pi
external usenet poster
 
Posts: 1
Default countif in Access Reports

I need to countif, where [gradeCompleted] is text with values of 8,9,10,11 or
12
=IIf([qClass Profile R2]![gradeCompleted]=8,1,0)
This is an inherited db that has 2 full capacity tables and will not accept
a datatype change
  #2  
Old March 11th, 2007, 02:32 AM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default countif in Access Reports

Try:
=IIf([qClass Profile R2]![gradeCompleted] IN ("8", "9", "10", "11",
"12"), 1, 0)

I am uncertain whether the IN operator will work in this context, but give
it a shot. If that doesn't work, you could try putting the expression into a
Field in the query, and you would then be able to sum that field in your
report.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"P T Pi" P T wrote in message
...
I need to countif, where [gradeCompleted] is text with values of 8,9,10,11
or
12
=IIf([qClass Profile R2]![gradeCompleted]=8,1,0)
This is an inherited db that has 2 full capacity tables and will not
accept
a datatype change


  #3  
Old May 9th, 2007, 04:00 AM posted to microsoft.public.access.reports
P T Pi[_2_]
external usenet poster
 
Posts: 1
Default countif in Access Reports

Thank you very much Allen. It actually worked well.

"Allen Browne" wrote:

Try:
=IIf([qClass Profile R2]![gradeCompleted] IN ("8", "9", "10", "11",
"12"), 1, 0)

I am uncertain whether the IN operator will work in this context, but give
it a shot. If that doesn't work, you could try putting the expression into a
Field in the query, and you would then be able to sum that field in your
report.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"P T Pi" P T wrote in message
...
I need to countif, where [gradeCompleted] is text with values of 8,9,10,11
or
12
=IIf([qClass Profile R2]![gradeCompleted]=8,1,0)
This is an inherited db that has 2 full capacity tables and will not
accept
a datatype change



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.