Calculate number of smaller records in field

G

Guest

I am trying to write a query that will tell me how many records in a given field are (i) smaller than and (ii) larger than each record in that field. This is similar to a ranking function. I can accomplish this in Excel, but I can't seem to do it in Access

In other words, if I have a field with 1,000 records, I would like to know how many records in that field are smaller and larger than records 1,2,3...1,000.
 
C

ChrisJ

Smaller: DCount("[YourField]","[YourTable]","[YourField]>"&
[YourField])
Larger: DCount("[YourField]","[YourTable]","[YourField]<"&
[YourField])
-----Original Message-----
I am trying to write a query that will tell me how many
records in a given field are (i) smaller than and (ii)
larger than each record in that field. This is similar to
a ranking function. I can accomplish this in Excel, but I
can't seem to do it in Access.
In other words, if I have a field with 1,000 records, I
would like to know how many records in that field are
smaller and larger than records 1,2,3...1,000.
 

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