access courses in london - count queries
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
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

resolvedResolved · Low Priority · Version Standard

replyReply Mon 4 Jun 2007, 16:24Delegate Jonathan said...

Jonathan has attended:
Access Intermediate course

Count queries

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

For upcoming training course dates see: Pricing & availability

replyReply Thu 7 Jun 2007, 15:08Trainer Richard said...

RE: Count queries

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.







 

Access tip:

Create An Inaccessible Field On A Form

There is sometimes a need to make a field in a form look like a normal field but be completely inaccessible to the user. To do this:

In the Field's Properties
Set the ENABLED property to No
Set the LOCKED property to Yes

The field will not grey out, but the user will not be able to do anything with it.

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard