Help with a totals or sum query

S

Scuda

Sorry for the re-post, put it in the wrong area:
Hi All, I currently using

=DMax("[SENE_CASE_#]","tblSENEIncidentLogCY")

to give me a count of ALL Incidents (SENE_CASE_#), i know about the poor
labeling, I am changing it.

BUT, what I would like is a TOTAL of the TYPE of incidents in the
tblSENEIncidentLogCY. In my field NATURE OF DISTRESS (in that table) there
are 4 types, they will have either SAR, ADMIN, LE, or M in the NATURE OF
DISTRESS.

How can I modify my code to get specific totals?

Thanks so much!

Steph
 
K

KARL DEWEY

This will count --
SELECT [NATURE OF DISTRESS], Count([NATURE OF DISTRESS]) AS CountOfType
FROM tblSENEIncidentLogCY
GROUP BY [NATURE OF DISTRESS];
 
J

John W. Vinson

Sorry for the re-post, put it in the wrong area:
Hi All, I currently using

=DMax("[SENE_CASE_#]","tblSENEIncidentLogCY")

to give me a count of ALL Incidents (SENE_CASE_#), i know about the poor
labeling, I am changing it.

BUT, what I would like is a TOTAL of the TYPE of incidents in the
tblSENEIncidentLogCY. In my field NATURE OF DISTRESS (in that table) there
are 4 types, they will have either SAR, ADMIN, LE, or M in the NATURE OF
DISTRESS.

How can I modify my code to get specific totals?

Thanks so much!

Steph

I'm not sure what you're asking. Do you want one answer, or four answers? You
won't get four answers from a DMax nor in one textbox. And there is absolutely
nothing in your post that would indicate where the NATURE OF DISTRESS should
be put.

My *GUESS* is that you will want a Totals query, grouping by [Nature of
Distress], and using either Sum or Count to add up or count (something, I
don't know what, since I know nothing about your tables); the results of the
Query could be displayed on a subform. You will not (at all easily or
desirably) be able to display the results in a single textbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top