Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count on a report 3

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I have a very simple Report that pulls from a query. I have a field named EXP. I am simply trying to count how many records meet a certain criteria. I have tried the following however it just returns the total number of records not filtering the criteria...any help is appreciated....Thanks!

Code:
=Count(Abs([exp]>2051201))
 
Counting with criteria in a report is the same as summing the absolute value of the criteria. I know this looks like it sums, but it will count:


=Sum(Abs([exp]>2051201))

 
Or something like this:
=Nz(Sum(Abs([YourField]>2051201))) for a numberic field, for a text field you can use "".

Pampers [afro]
You never too young to learn
 
Thanks for the help! however, I have tried both of your suggestions and I still come up with the total population in the query or table, it is not filtering out just the >2051201 records....is there something i could be doing wrong? thanks again!

Paul
 
it is not filtering out just the >2051201 records

Now I am not confident I understand what you are trying to do.
Are you making a textbox in a report?
Or are you hoping to suppress the display of data?

 
Sorry if I confused. No I do NOT want to suppress the data. If there are 500 records that have a value of GREATER than 2051201 I just want to see the total count of 500 appear. But what is happening is that it is displaying the total number of records in the table or the total number of records that the query is bringing up....It is not giving me a count of records that is greater than 2051201.

Thanks AGAIN for your help.

Paul
 
What do you see in your query if you create a column like:
CountMe: Abs([exp]>2051201)

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Oh, Duane, you are amazing. . .this worked perfectly. Thank you for teaching me so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top