Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 05-02-2006, 06:22 AM   #1
SnowPatrol
Registered User
 
Join Date: Feb 2006
Location: Craven Cottage
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
SnowPatrol is on a distinguished road
Calculate number of entries by year and frequency

Hi, am sure this is simple....! Can't find a solution.

I have records which have YEAR and APPARATUS as two of the fields. All I want to do is write a query which displays all the records chronologically by YEAR then within each YEAR to group them by the biggest subset according to APPARARTUS.

Therefore if there were 20 people who used Motorised equipment, 15 who used electrical and 10 who used gas, the records would be grouped in that order. Thus showing the pattern in change in use of specific apparatus over the years.

Why can't I DO THIS!!??

aLI

SnowPatrol is offline   Reply With Quote
Old 05-02-2006, 06:30 AM   #2
namliam
The Mailman - AWF VIP
 
Join Date: Aug 2003
Location: Amsterdam/The Netherlands
Posts: 11,388
Thanks: 0
Thanked 798 Times in 785 Posts
namliam is a glorious beacon of light namliam is a glorious beacon of light namliam is a glorious beacon of light namliam is a glorious beacon of light namliam is a glorious beacon of light
Because your not using a "group by" query ?
namliam is offline   Reply With Quote
Old 05-02-2006, 06:34 AM   #3
SnowPatrol
Registered User
 
Join Date: Feb 2006
Location: Craven Cottage
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
SnowPatrol is on a distinguished road
Hi, sadly I am using GROUP BY. It orders by year fine, it groups by apparatus within each year fine but NOT in order of most prevalent group, just in alphabetical order! Does thqt make sense?!

SnowPatrol is offline   Reply With Quote
Old 05-02-2006, 06:44 AM   #4
namliam
The Mailman - AWF VIP
 
Join Date: Aug 2003
Location: Amsterdam/The Netherlands
Posts: 11,388
Thanks: 0
Thanked 798 Times in 785 Posts
namliam is a glorious beacon of light namliam is a glorious beacon of light namliam is a glorious beacon of light namliam is a glorious beacon of light namliam is a glorious beacon of light
Yeah that makes sence, and thats the way a group by works.

You simple need to add the sort order... Just look up the Sort: line in the query design and order the result any way you see fit.

Good Luck

namliam is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 01:24 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World