Results 1 to 8 of 8
  1. #1
    rjanzic is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    3

    Access Report display contents horizontally not vertically

    If I have a report that show all values five groups into the database with fields being displayed vertically, how can this be changed so the detail is displayed horizontally. I hope the following best describes this:



    The way Access currently sets up its report grouped on a fifth set of variables:

    Field 1
    Field 2
    Field 3
    Field 4
    Field 5
    Field 6a
    Field 6b
    Field 6c
    Etc

    The way I would like to have the data displayed:

    Field 1
    Field 2
    Field 3
    Field 4
    Field 5
    Field 6a, Field 6b, Field 6c, etc

    How would one go about programming this? Any help would be greatly appreciated.

    Regards,

    Rob

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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
    rjanzic is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    3
    Thanks for these links, but not totally what I am after. I have asked a programmer friend to help out and when I get a solution will see about posting the code.

    [QUOTE=June7;142284]Review:
    http://forums.aspfree.com/microsoft-...ry-322123.html
    http://allenbrowne.com/func-concat.html[/

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Look at crosstab queries. Basically you're taking row labels and trying to make them column headers which is what crosstab queries are built to do

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Crosstab might be an option. However, can be frustratingly dynamic in that the fields returned each time might be different. Stabilizing a crosstab to run perpetually in a report can be tricky.
    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.

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Absolutely right, only a solution best used if your intended columns never change or change so rarely the maintenance would be low.

  7. #7
    rjanzic is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    3
    Quote Originally Posted by rpeare View Post
    Absolutely right, only a solution best used if your intended columns never change or change so rarely the maintenance would be low.
    Yes, crosstab queries don't really work either as the data is quite variable. There might be 45 field values in one case and then just one in another. Anyway, have looked for the code on the web, but couldn't find it and I think this would be the best way, run through the dB until EOF and have a string variable concatenate all the values into one field. That's the way forward I think and will follow-up with our solution.

    Regards,

    Rob

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I provided link to Allen Browne's "concatenate values from related records" tutorial. It offers code to do just what you describe.

    Unfortunately, Allen neglects this one little instruction in his tutorial:

    Set a VBA reference to: Microsoft DAO 3.x Object Library

    From the VBA editor > Tools > References > find and check the library
    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.

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

Similar Threads

  1. Vertically Dynamic Report
    By chris.williams in forum Reports
    Replies: 1
    Last Post: 09-05-2012, 08:11 PM
  2. Replies: 4
    Last Post: 05-25-2012, 09:43 AM
  3. Access Report: List Detail Horizontally
    By rad1182 in forum Access
    Replies: 1
    Last Post: 01-11-2012, 04:24 PM
  4. Replies: 11
    Last Post: 10-04-2011, 02:29 AM
  5. Replies: 0
    Last Post: 04-19-2008, 09:08 PM

Tags for this Thread

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