Results 1 to 5 of 5
  1. #1
    eliascm is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    3

    Question Date not Properly Formatted in Crosstab Query

    I have a crosstab query based on a single table. The query works as expected except for one problem: The column heading is report date from the record field report_date. In the table report_date is formatted mmm-yyyy. The date is properly formatted in a datasheet view of the table and in a simple select query based on the table and in a form based on the table. However, the columns in the crosstab query are formatted m/1/yyyy. I have tried using a format statement for the date and converting the resulting string to a date using the function CDate (the conversion is necessary to sort the date as a date and not a string). Nothing I have tried results in the desired format for the date columns in the crosstab query.

    Please help me if you can. This may be a bug, but I don't know how to inform Microsoft about the problem.



    Thanks!
    Last edited by eliascm; 02-08-2012 at 06:21 AM. Reason: Additional Information

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Can you provide project for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    eliascm is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    3

    Date Columns not Formatted Properly in Crosstab Query

    Attached is the database.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    If you want the columns in chronological order by month and year, will have to live with that structure. It is the nature of crosstab with dates.

    The alternative is a select query with a field that calculates the month and year as a string and use that query as source for the crosstab and that constructed field as the crosstab columns. That means the column order will be alpha instead of chrono.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    eliascm is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2012
    Posts
    3

    Date not Formatted as Expected in Crosstab Query

    Thanks for the reply. I would much rather stick with the current date format than have the dates sorted as strings.

    Charles

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query not functioninng Properly
    By jo15765 in forum Queries
    Replies: 16
    Last Post: 06-26-2011, 12:24 AM
  2. Replies: 12
    Last Post: 02-22-2011, 03:39 PM
  3. Replies: 20
    Last Post: 02-14-2011, 10:55 AM
  4. Replies: 3
    Last Post: 11-19-2009, 09:15 PM
  5. Query on chart not working properly!
    By Sim_ in forum Queries
    Replies: 0
    Last Post: 10-28-2009, 09:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums