Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36

    Specifying Date Format for Column Heading in Crosstab Query

    Under Access 2003, the simple expression, attached below, allowed me to include the day of the week in the date field (column heading) of a cross tab query (Sunday, 12/25/2010 versus simply 12/25/2010).



    Under Access 2010, I get the "There is no message for this error" when trying to open the query.

    Recreating the object and code does not solve the problem.

    Is there some new syntax that is required?

    Thank you.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It should work. Try recreating the query from scratch and see what happens.

  3. #3
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    Thanks for the reply.

    Yes, as mentioned, I had already tried recreating the query, without success.

    I tried again anyway, and again received the error message.

    See attachment for Error message and Query Design.

    Thanks.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try just "mm/dd/yy" and see what happens.

  5. #5
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    Yes, that works fine, as does "mm/dd/yyyy", which is the format that it is in now, and that I am trying to change.

    Thanks.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about "mm/dd/yyyy dddd"? How about "Long Date"

  7. #7
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    Well, now "ddd, mm/dd/yyyy" is finally working!

    ("dddd, mm/dd/yyyy" also works).

    Is there a way to specify the width of the columns in a crosstab query? The current width does not allow the entire date to display.

    Thanks.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Can't you just drag it wider in datasheet view and save it?

  9. #9
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    The number of columns in this query varies widely, so I was really looking for a solution that would set the column width to a fixed measurement, regardless of the number of columns.

    In any case, dragging the column width and saving seems to work when running the query alone, but not when I run it from the Form. Weird.

    Thanks, for your continued assistance.

  10. #10
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    Oh, well, I just dragged the columns to the desired width on the query generated from the form, and that seems to work...at least for the number of columns generated by that particular query run.

    Thanks.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's probably the best we will come up with for this. Thanks for marking the thread as Solved.

  12. #12
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    I am reopening this thread because I have discovered that the error that I was receiving (see Post #3 above), was due to the JOIN type (also visible in the attachment to Post #3 above), rather than the date format as originally thought.

    This Join Type worked perfectly fine under Access 2003, giving us the query layout we desired. Because of this prior functionality, I am not sure where to start in resolving the problem, particularly because of the cryptic nature of the error message.

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Could you post the SQL view of the query so we can see it please?

  14. #14
    mwolfod is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2010
    Posts
    36
    SQL of the query is attached.

    Thanks.

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you believe a Left Join is causing the problem? Have you tried other Join types?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem with cross tab on column heading
    By pascal_22 in forum Queries
    Replies: 0
    Last Post: 12-01-2010, 08:00 AM
  2. How to change the column heading in a "split form"
    By robertrobert905 in forum Forms
    Replies: 1
    Last Post: 09-21-2010, 02:42 PM
  3. Replies: 5
    Last Post: 09-10-2010, 10:07 AM
  4. Replies: 1
    Last Post: 09-05-2010, 11:28 AM
  5. Populating list box with column heading?
    By kawi6rr in forum Programming
    Replies: 1
    Last Post: 08-13-2010, 12:51 PM

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