A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

sort query results for a form



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2004, 06:08 AM
Jeff Lane
external usenet poster
 
Posts: n/a
Default sort query results for a form

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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.686 / Virus Database: 447 - Release Date: 14/05/2004


  #2  
Old May 30th, 2004, 07:33 AM
Steve Schapel
external usenet poster
 
Posts: n/a
Default sort query results for a form

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.

--
Steve Schapel, Microsoft Access MVP


Jeff Lane wrote:
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.