Count Query?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following fields in a table:

DateofExam (date field), #ofExams (number), Examiner (text)

Example: 8/15/2007, 5, Jones

I can't figure out how to build a query that will sum the "#ofExams" field?

Any help would be appreciated.

Thanks!
 
Thanks for the reply. Can't seem to make it work...

Where exactly do I do this - in the design area of a query?

Ken Snell (MVP) said:
Ummmm...

SELECT Sum([#ofExams]) AS TheSum
FROM TableName;

--

Ken Snell
<MS ACCESS MVP>


Dave Reisinger said:
I have the following fields in a table:

DateofExam (date field), #ofExams (number), Examiner (text)

Example: 8/15/2007, 5, Jones

I can't figure out how to build a query that will sum the "#ofExams"
field?

Any help would be appreciated.

Thanks!
 
Sorry, I wasn't clear...I got the sum of the entire column to work...I am
trying to figure out how to return the count via a parameter date query

Ken Snell (MVP) said:
Ummmm...

SELECT Sum([#ofExams]) AS TheSum
FROM TableName;

--

Ken Snell
<MS ACCESS MVP>


Dave Reisinger said:
I have the following fields in a table:

DateofExam (date field), #ofExams (number), Examiner (text)

Example: 8/15/2007, 5, Jones

I can't figure out how to build a query that will sum the "#ofExams"
field?

Any help would be appreciated.

Thanks!
 
The SELECT statement that I provided is an SQL statement. You can open a
query in design view, not select any tables, and close the "table select"
window, then you'll see the SQL view option on button on toolbar for query
view.

However, the statement I gave is generic, so you can also build the correct
statement in design view by adding your table to the design grid, click on
button on toolbar with Greek letter sigma (looks a bit like an E), add your
#ofExams field to the grid, and select Sum as the Total: field.

To get a sum using a date parameter, what you do extra is add your date
field to the grid, then in the Criteria: field you can put a parameter. If
you want an exact date:
[Enter date (in mm/dd/yyyy format):]

If you want a range:
Between [Enter start date (in mm/dd/yyyy format):] And [Enter enddate
(in mm/dd/yyyy format):]

--

Ken Snell
<MS ACCESS MVP>



Dave Reisinger said:
Sorry, I wasn't clear...I got the sum of the entire column to work...I am
trying to figure out how to return the count via a parameter date query

Ken Snell (MVP) said:
Ummmm...

SELECT Sum([#ofExams]) AS TheSum
FROM TableName;

--

Ken Snell
<MS ACCESS MVP>


message
I have the following fields in a table:

DateofExam (date field), #ofExams (number), Examiner (text)

Example: 8/15/2007, 5, Jones

I can't figure out how to build a query that will sum the "#ofExams"
field?

Any help would be appreciated.

Thanks!
 
Back
Top