Re: Sum,Sort, Format, and Date Range
From: fredg (fgutkind_at_example.invalid)
Date: 03/08/05
- Next message: John Vinson: "Re: Updateable Query To List Products Ordered"
- Previous message: Amit: "Having trouble with a query"
- In reply to: finster26: "Sum,Sort, Format, and Date Range"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 08 Mar 2005 00:36:58 GMT
On Mon, 7 Mar 2005 13:23:06 -0800, finster26 wrote:
> I have a DATE/TIME field and a Currency field.
>
> I am formatting the date to "mmmm, yyyy" then GROUPING the by month/year and
> SUM the Currency field.
>
> I want to be able to select records between dates. I cannot use criteria in
> the formatted date field to select the records bewteen dates. Formatted date
> is a String. I also want to sort the formatted Date field but I it will not
> sort correctly because it's a String.
>
> SELECT DISTINCTROW Format([DIE HEADINGS].[DATE],'mmmm yyyy') AS [DATE By
> Month], Sum([DIE HEADINGS].[COST DIECOST]) AS [Sum Of COST DIECOST]
> FROM [DIE HEADINGS]
> GROUP BY Format([DIE HEADINGS].[DATE],'mmmm yyyy');
>
> What is the appropriate way to add the criteria and sort the records by
> Month/Year?
>
> Thanks,
>
> Bob
To add emphasis to MGFoster's reply regarding your use of Date as a
field name:
See the Microsoft KnowledgeBase article for your version of Access:
109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'
-- Fred Please only reply to this newsgroup. I do not reply to personal email.
- Next message: John Vinson: "Re: Updateable Query To List Products Ordered"
- Previous message: Amit: "Having trouble with a query"
- In reply to: finster26: "Sum,Sort, Format, and Date Range"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|