Re: Help Needed With Format Of Query Expression



On Apr 30, 3:40 pm, "Larry Linson" <boun...@xxxxxxxxxxxxx> wrote:
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

Thanks Larry.
.



Relevant Pages

  • Re: change default numbering in access all versions
    ... If you want to sort a text field in number order then you have to force the text to become a number using the Val function or CDbl. ... Another alternative is to store all the text numbers with leading zeroes or force leading zeroes before you sort using the format function - ... i have other numeral columns without this type of confusion. ...
    (microsoft.public.access.queries)
  • Re: Group Header Sorting
    ... Use the Val function: add it as a computed field to the query, and then sort ... >I have a group header that I am using to sort data on a report. ...
    (microsoft.public.access.reports)
  • Re: Sorting on mixed text-numeric
    ... to convert these to numeric but I have tried cInt and a number of ... other VBscript conversion functions, and I always get a type-conflict ... How can I convert this field in the query so that it will sort ...
    (microsoft.public.access.gettingstarted)
  • RE: Report in Certain Order
    ... Thanks OssieMac for your concise and prompt answer. ... This is so the numeric sort ... Set sort for this field to Ascending. ... Val function reads the text up to last numeric and creates a real number so ...
    (microsoft.public.access.gettingstarted)
  • Re: sort numbers in a query
    ... Look at the way each aligns ... > When I try to sort in a query 10/12 Brown Street ... I have tried the Val function but it ...
    (microsoft.public.access.queries)