Sum,Sort, Format, and Date Range

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: finster26 (finster26_at_discussions.microsoft.com)
Date: 03/07/05


Date: Mon, 7 Mar 2005 13:23:06 -0800

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



Relevant Pages

  • RE: Strange formatting in textbox on report, sporadic and unwelcome
    ... Brother printer we are using. ... This currency field, instead of printing right justified, like this: ... and the formatting is actually set to CURRENCY and Right ...
    (microsoft.public.access.reports)
  • I could use some help with this access/word whackiness
    ... I'm trying to merge some currency field into a document. ... the query, it'll lose for formatting to. ... I've looked at the field codes for mergefield ...
    (microsoft.public.word.mailmerge.fields)
  • Strange formatting in textbox on report, sporadic and unwelcome
    ... 2003, windows XP, SQL backend) that has a currency field in a group footer of ... Occasionally this currencty field will HICCUP and we'll get a very strange ... This currency field, instead of printing right justified, like this: ... and the formatting is actually set to CURRENCY and Right ...
    (microsoft.public.access.reports)
  • Merge Field Formatting
    ... currency field gets merged into Word it goes back to standard formating ... to keep the formatting or a code i can enter to maintain the MS Access ... Prev by Date: ...
    (microsoft.public.word.mailmerge.fields)
  • Re: New Python 3.0 string formatting - really necessary?
    ... When working on resource-oriented, generalized display applications ... ways - and on the web, display means "convert to a string for the ... the template knows how I ... I can solve this using the new string formatting. ...
    (comp.lang.python)