Re: Help Needed With Format Of Query Expression



Format yields a text field. If you obtain the week and year via formatting,
they will BE text and sort as text. You can convert them to numeric with
the CInt or Val function, or you can calculate them instead of using the
Format statement/function to obtain them. I suspect the former will be
simpler than the latter.

Larry Linson
Microsoft Office Access MVP


"Wayne" <cqdigital@xxxxxxxxxxxxxxx> wrote in message
news:383639aa-8b23-46a9-b99f-84b8c60bce85@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 30, 1:37 pm, "KC-Mass" <connearneyATcomcastDOTnet> wrote:
Add two expressions to the query. One is the year and the other is the
week
(in that order).
Sort on those and just display your "Week: Format([TxtDate],"ww yy",4)".

Regards

Kevin C

Thanks for the reply but I tried that. The Week and Year fields still
sort as Text fields, not Number fields. Even if they did sort as
Number fields the whole thing still falls over when the query spans
several years.


.



Relevant Pages

  • Re: Completely baffled on what should be simple
    ... the same thing I previously did, changing format to custom ... sort, it didn't work. ... if a cell contains the text ...
    (microsoft.public.excel.misc)
  • Re: Completely baffled on what should be simple
    ... And remember just changing the format of the cell won't change the underlying ... sort, it didn't work. ... for the extensions that have either one or two 0's as the first numbers, ...
    (microsoft.public.excel.misc)
  • Re: Sane Syntax
    ... It's sort of like a game of telephone - if converting ... I don't know much about DocBook, but tsy's "Super DocBook" format does ... capability for visual markup, ... material before it was typeset. ...
    (comp.text.tex)
  • Re: Sort order - Data midified / Created
    ... What you suggest is a kludge to get around a Windows flaw. ... on the sub heading "Change the date, time, or number format" On the Formats ... All I do is click on the column header and the sort happens, ...
    (microsoft.public.windows.vista.general)
  • B-Tree Index Usage
    ... to write programs using/abusing an editor instead of the proper programming ... By the way my latest testing indicates that a Sort will not use a date index ... interpretation betwwen ACCESS and a program. ... to get the proper format the program DM,BP, DATE will still give one the ...
    (comp.databases.pick)