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!

Help, Please. Finding the Mode

Status
Not open for further replies.

Obsessive

Instructor
May 15, 2003
9
US
I've been messing around with the expression builder but cannot find the syntax to find the Mode - the # most often (most frequently) shown within a group of records. My field name is [Lead Time], I'm not sure if it's important, but it is a calculated field from a query.
Code:
(Lead Time: =[received]-[ordered])
.
 
I suppose you could use multiple queries. One would group by the Lead Time field/column and count the occurrences. Then select the TOP 1 of this query sorted by the number of occurrences DESC.

Duane
MS Access MVP
 
No need for multiple queries. Just the single aggregate count on grouped by value sorted desc top 1.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top