sort query results for a form

  • Thread starter Thread starter Jeff Lane
  • Start date Start date
J

Jeff Lane

I have a simple query that gets all the results, that are not null, of one
column for a predetermined date from one table.
The results are 5 different text labels of varying amounts depending on the
month. the labels are 109, 231, 508, 606, 425.
Is there any way of producing a report that will count these?
i.e. Results for January
109=75
231=125
508=92
425=30
606=87

At the moment I export it to excel on completion and do a =counta() query.
it just seems to me there would be a simpler, more elegant way to do this?

I have attached the query code if it is of any use.

SELECT [Ryder Mot].Area, [Ryder Mot].[Test Date]
FROM [Ryder Mot]
GROUP BY [Ryder Mot].Area, [Ryder Mot].[Test Date]
HAVING ((([Ryder Mot].Area) Is Not Null) AND (([Ryder Mot].[Test Date])
Between #1/1/2004# And #2/1/2004#))
ORDER BY [Ryder Mot].Area;
All help gratefully recieved
 
Jeff,

At the moment, I can't really see any correspondence between the SQL of
the query that you posted, and the description and example of what
you've got. Also, I can't see why the SQL describes a Totals Query when
there are no totals (aggregate functions) used in the query. But if
your meaning is that you end up with 2 columns of data, and the 109,
231, etc refer to some sort of category code, and the 75, 125, etc refer
to numerical values, then if you have a report based on this data, you
can do this in the Report Footer section... put an unbound textbox
there, and in its Control Source property put the equivalent of...
=Sum([NameOfNumberField])

If you need further help with this, please post back with some more
explanation.
 
Back
Top