access courses in london - count queries
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » access courses in london - Count queries

access courses in london - Count queries

The UK's most regular instructor-led training courses.
Training information: access courses in london · Microsoft.access.courses · Microsoft Access Training uk
See also · microsoft access training · access vba courses · access database course

resolvedResolved · Low Priority · Version Standard

Count queries

Jonathan has attended:
Access Intermediate course

by - delegate Jonathan [2 posts] (2007 Jun 4 Mon, 16:24) replyReply

I am familiar with COUNT queries, but I wondered if it was possible to COUNT within categories or ranges of values.

For example, I have 100 orders each of different amounts between £20 and £100 pounds.

I can easily run a COUNT query that tells me how many oders are of £20, how many of £25, etc.

Is it possible to run one query that tells me how many orders are <£30, how many are between £30 & £50, and how many between £50 and £100?

Thanks

Access VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Dec 4 Thu + 5 Fri Southwark 7 book now £345 £399
2003 2009 Jan 8 Thu + 9 Fri Southwark 6 book now £450 £485
2003 2009 Feb 5 Thu + 6 Fri Southwark 8 book now £275 £399
2003 2009 Mar 5 Thu + 6 Fri Southwark 7 book now £345 £399
2003 2009 Apr 8 Wed + 9 Thu Southwark 8 book now £275 £399
2003 2009 May 7 Thu + 8 Fri Southwark 8 book now £275 £399
Full Schedule: See all 12 Access VBA course dates.
Bookings currently available until 5th November 2009.

RE: Count queries

by - trainer Richard platinum contributer[818 posts] (2007 Jun 7 Thu, 15:08) replyReply

Jonothan,

You might need to do 3 separate queries until you find a better way. Create a basic query that has criteria on the AMOUNT field, and specify your range. Once this step is done, you can then count the number of records.

You could Also use a SQL statement like this:


You need to do a query where you use the Group By statement something like follows:

SELECT tblYourTable.Question1Answer, Count(tblYourTable.Question1Answer) AS MyCount
FROM tblYourTable
GROUP BY tblYourTable.Question1Answer
ORDER BY tblYourTable.Question1Answer;

tblYourTable = The name of your table.
Question1Answer = The name of the field with your answers in it.

This is one of the most powerful SQL abilities of course, but a lot of people forget that you can put a count() of in the SELECT statement to get the number of occurrences.








Related articles

· Microsoft Access Tighten your Security Controls
· Access Database Optimization: First Normal Form
· Discover the Secrets within Your Business through Microsoft Access Training
· MS Access Top Tips: Takeaways From Microsoft Access Advanced Training
· Microsoft Access as a Business's Database Management System

Access tip:

Compact database automoatically

To ensure optimal performance, you should compact and repair your

Open the Access database or Access project that you want Access to compact automatically.
On the Tools menu, click Options.
Click the General tab.
Select the Compact on Close check box.

View all Access hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz