Results 1 to 7 of 7
  1. #1
    xyz123 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    2

    Need help! Query to convert rows to cols and vice-versa

    Hi,
    Here is a very challenging problem in ms access 2007 (at least for me
    )
    There is a 2 column table as:
    Month| Title
    -------------
    JAN | A
    JAN | B
    JAN | C
    FEB | D
    FEB | E
    MAR | F
    APR | G
    APR | H
    MAY | I
    MAY | J
    MAY | K


    Problem:
    This table needs to be displayed as following "in an Access table or
    an Access query":
    JAN| FEB| MAR| APR| MAY
    -----------------------------------
    A | D | F | G | I
    B | E | - | H | J
    C | - | - | - | K
    I'm able to write this output to an Excel spreadsheet, but i've tried
    n number of ways to get the exact same output as above in Access, but
    I've not got any success yet.
    I really need help on this - not only because I'm struggling with
    this problme but also because now I am more curious in knowing how
    this can be done in Access.
    If you have a solution that you can provide I will highly appreciate
    your help!
    Thanks in advance!

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    transposing like Excel is not possible. why not try import/export, after using excel's functionality??

  3. #3
    xyz123 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    2
    Thanks for your prompt response Adam! I appreciate it!
    Actually, i also have to put a button on a switchboard which would perform all these operations and then I will show the result in an Access formatted report.

    Is there a way to automatically import/export data from a spreadsheet through a button.

    Thanks!

  4. #4
    ivancp is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2011
    Posts
    3
    Are you try this solution:

    http://support.microsoft.com/kb/202176

  5. #5
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    Quote Originally Posted by xyz123 View Post
    Is there a way to automatically import/export data from a spreadsheet through a button. Thanks!
    I have this code: https://www.accessforums.net/code-re...iles-9500.html

    Which allows you to select a folder (graphically) and will then automatically import all xls files in that folder. You can change the code as needed (It's fairly simple code). There's also some other code posted for exporting.

  6. #6
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by xyz123 View Post
    Thanks for your prompt response Adam! I appreciate it!
    Actually, i also have to put a button on a switchboard which would perform all these operations and then I will show the result in an Access formatted report.

    Is there a way to automatically import/export data from a spreadsheet through a button.

    Thanks!
    hey bud,

    I would suggest adopting the in-house coding method from Ivan's link. That's the best way to do it. Luckily for you, you can 'almost' copy it verbatim from the article and substitute your names in for it!

  7. #7
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Quote Originally Posted by ajetrumpet View Post
    hey bud,

    I would suggest adopting the in-house coding method from Ivan's link. That's the best way to do it. Luckily for you, you can 'almost' copy it verbatim from the article and substitute your names in for it!
    Ivan's link won't do it.

    it's not a simple transpose. I think we need some VBA do approch it.

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

Similar Threads

  1. Send in Email Body vice Attachment
    By cassidym in forum Programming
    Replies: 2
    Last Post: 10-20-2010, 06:21 AM
  2. Subtract Rows in Query Results
    By Sengenbe in forum Queries
    Replies: 5
    Last Post: 02-08-2010, 06:05 PM
  3. Convert query sql server for Access
    By webtony in forum Queries
    Replies: 0
    Last Post: 06-23-2009, 02:46 AM
  4. Convert Excel Macro to Access Query
    By crownedzero in forum Queries
    Replies: 1
    Last Post: 06-22-2009, 02:13 PM
  5. Replies: 0
    Last Post: 12-28-2008, 01:56 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