Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    months order in a query (Access 2000)

    The months in my totals query with the month;'s format like
    Month: Format([SalesDate];"yyyy-mmm")
    are ordered alphabetically and do not folllow the general order of january,february,march,april.etc.I want to set up my query so that the months should follow their natural order and not to begin with
    february.Can somebody help me to arrange the months ?

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: months order in a query (Access 2000)

    If you want to use the query as it, add a field with Format([SalesDate];"yyyymm"), sort on this field and make it invisible.
    If the query is to be used for a form or report, chang the format to Format([SalesDate];"yyyy-mm") and you can change the format on the form or report.
    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: months order in a query (Access 2000)

    Either sort on the date value in that field itself or create an expression field in the query like this:

    SalesMonth: Month([SalesDate])

    And then sort on that. If you have multiple years of data in the table, then you may just want to sort on the date value.
    Charlotte

Posting Permissions

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