Re: "Convert in Integer" for MA or any guru, please!



I thought you only wanted to sort the report by this value. You place the
expression
=Right(" " & [txtLayer], 4)
in the sorting and grouping expression/field.

Don't place this as the control source of any text box.

--
Duane Hookom
MS Access MVP
--

"JohnLute" <JohnLute@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C0BD14A3-2CAD-4842-BD75-AC0C9DCA51AD@xxxxxxxxxxxxxxxx
> Thanks, Duane!
>
> About "All"; "Even"; "Odd" I never thought about where but now that you
> mention it - these should appear first.
>
> About the other two codes: I tried them but neither worked. I'm placing
> them
> in the Control Source of the report's field. Have I misunderstood? The one
> you supplied returns #Error and the other MA supplied returns all as "0".
>
> THANKS!
>
> --
> www.Marzetti.com
>
>
> "Duane Hookom" wrote:
>
>> You haven't told us where you would expect to sort All, Even, or Odd.
>>
>> You can use an expression (or function) in the sorting and grouping
>> levels
>> rather than a field name. That's why someone suggested you use:
>> =CInt([txtLayer])
>>
>> Properly handling the text and numeric values may require a small
>> function.
>> You could also try an expression like:
>>
>> =Right(" " & [txtLayer], 4)
>>
>> --
>> Duane Hookom
>> MS Access MVP
>>
>>
>> "JohnLute" <JohnLute@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:99B9A225-8629-4D7D-AAD8-EAEF6364B6EA@xxxxxxxxxxxxxxxx
>> >I previously posted this but thought it would be better to start a new
>> > thread. I'm trying to get my criteria to ascend straight:
>> >
>> > Here are the two tables and pertinent fields I need to report:
>> > tblFinishedGoods
>> > txtProfileID (PK)
>> >
>> > tblFGUnitLoadLayerParameters
>> > txtProfileID (PK)
>> > txtLayer (PK)
>> >
>> > I use sfrmFGUnitLoadLayerParameters to make entries into
>> > tblFGUnitLoadLayerParameters. cbLayer is a value list:
>> > "All";"Even";"Odd";"1";"2";"3";"4";"5";"6";"7";"8";"9";"10";"11";"12";"13";"14";"15";"16";"17";"18";"19";"20"
>> >
>> > I'd like my report of cbLayer to ascend. This creates the problem of
>> > "10"
>> > following "1" as well as "20" following "2":
>> > 1
>> > 10
>> > 2
>> > 20
>> > 3
>> > 4
>> > 5
>> >
>> > How can I set this up so that the numeric sequence is truly ascending:
>> > 1
>> > 2
>> > 3
>> > 4
>> > 5
>> > 10
>> > 20
>> >
>> > MA replied:
>> >
>> > Convert in Integer
>> > CInt(yourfield)
>> >
>> > Can someone please expand on this? I've never dealt with this so it's
>> > unclear. Access help states that conversions from text to numeric can
>> > be
>> > done
>> > BUT ALL values must be numeric. As you can see, I have text and numeric
>> > stored in the field. Is it possible to achieve true ascending criteria?
>> >
>> > THANKS!!!
>> >
>> > --
>> > www.Marzetti.com
>>
>>
>>


.



Relevant Pages

  • RE: Sorting Dates
    ... If you want to sort on the date field, it should be a date data type. ... sorting or using in calculations. ... I am trying to re-do the report as we speak. ... "Duane Hookom" wrote: ...
    (microsoft.public.access.reports)
  • Re: Selecting records matching user input
    ... Report order is controlled by the Sorting and Grouping dialog of the report. ... What I meant by SOMETIMES the sort order of the query works is just that. ... I have removed everything from Grouping and Sorting and now ORDER BY in my SELECT query is working as it should. ...
    (microsoft.public.access.modulesdaovba)
  • Re: "Sort" a combination of letters and numbers e.g. 20, 21a,200,
    ... The sorting for the report works beautifully, however, any VBA code ... Sometimes I will want to sort by a) area and then b) Tag, ... I only have one piece of code in my database so far, ...
    (microsoft.public.access.reports)
  • Re: Sorting by complex alphanumeric data
    ... sort as though it were a true Year. ... I didn't know that you could write statements into the sorting and grouping ... most likely could use in the Report Sorting & Grouping what I gave you above ... The first one characters are always letters. ...
    (microsoft.public.access.reports)
  • Re: A Fast sorting algorithm for almost sorted data
    ... far my compressor has potential but is nowhere near ready. ... It does however make heavy use of sorting. ... which I am currently calling Run sort. ... entire selected run can be added to the sorted output array. ...
    (comp.compression)