Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601

    Unanswered: Inproper Date Sorting

    I made a query that grab the date on a field and combines it per month and such. That all works except for when I try to do a report based on that query, it alphabetizes them by month. How do I not have it alphabetise?
    Ryan
    My Blog

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,420
    Provided Answers: 7
    Get the Last/frist of the Date and sort it by that
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

  3. #3
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    you lost me.
    Ryan
    My Blog

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I had a similar problem to this. You need to have 2 fields. One which acts like what you want displayed and another behind the scenes which sorts the way you want it. In other words, if you try to alphabetize on the Month, you'll get April, August, etc.. You need to set up another field which alphabetizes it the correct way (hidden) and just use the month field as a "display". There's different ways this can be done so seeing what you're trying to do would help out a lot.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  5. #5
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    Paul, would the second textbox refence the hidden box or what?
    Ryan
    My Blog

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Your second field would represent the month in a numeric way (i.e. exp: format([MyDateField],"mm")) of your date field and then sorted ascending. You can sort on this column in the query or in the sorting and grouping on the report.
    Last edited by pkstormy; 09-24-06 at 02:11.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •