Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10

    Consolidate multiple columns into one


    I would like to consolidate all the values in multiple columns into one long column. Anyone know how to do this? Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    [Field1] & [Field2] & [Field3]...
    ...but why would you want to do this?

  3. #3
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10
    First off, I don't want them combining the values which what you suggested does. I want it to list the all the values in column 1 and then under that the values for column 2. It more has to do with the retarded nature of the software I'm pulling data from, I've contacted them and there is nothing I can do there.

  4. #4
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    If you read the suggestion correctly you would have noticed that the different fields wer concatenated using the & ampersand as opposed to the + plus sign. The plus sign would perform mathmatically on adjoining numeric fields, whereas the & string the values together.

    As RG stated why do you want to do this and how is the user going to differentiate when one field ends and another starts unless you use some soft of delimiter.

    David

  5. #5
    oddsteven is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    5
    If what you want to do is combine three fields into one, then [Field1] & " " & [Field2] & " " & [Field3] will give you all three fields pulled into one with a space between each entry - you could then copy that entire column, start a new table, and past the column into it. That sounds sloppy but if it's a one off thing that's quick and easy.

  6. #6
    oddsteven is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    5
    Alternatively you could copy all three columns into an MSWord file, and combine them there, using MSWord tables. Also relatively sloppy but it works.

  7. #7
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10
    The problem lies in the fact I have 40 columns, each about 300 rows and I have to do this often. When I use the '&' it puts all 40 columns into one cell, I need one column with (40x300 or 12000) rows. Each cell is actually text, not numbers, so its not the '+' thing. I'm still looking for an easier solution than copy/paste.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you need all of the fields (columns) to be appended to the table as additional records (rows), right? Can you explaix *why* you need this so we can better understand what you are up against?

  9. #9
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10
    Yes, basically in these fields are Scholarship names, but in them is also the Student IDs. I need these in one long list in one column so I can break it out as well as add info in columns next to them. Below is an example:

    Column 1 Column 2 Column 3...etc.
    12aa 12bb 05cc
    15aa 16bb 25cc
    19aa 21bb 26cc

    I need:
    Column 1
    12aa
    15aa
    19aa
    12bb
    16bb
    21bb
    05cc
    25cc
    26cc

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    So you need the Field2 entries appended to the Field1 entries and then append the Field3, etc?

  11. #11
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10
    Yes, that is correct.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Any chance you could post a sample db so we would have something to work with while creating the function you need?

  13. #13
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10
    Attached is a sample database to work with.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The attached should give you something to work with.

  15. #15
    COforlife is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    10
    RuralGuy,

    Thanks for the database. I unfortunately though do not know VB well enough to know how to run the module. Your help has been appreciated, thanks so much.

    Chad

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

Similar Threads

  1. Combo Box with multiple columns
    By desireemm1 in forum Access
    Replies: 1
    Last Post: 08-17-2009, 02:36 AM
  2. Multiple Price Columns
    By kmwhitt in forum Access
    Replies: 0
    Last Post: 04-04-2009, 09:48 PM
  3. Replies: 1
    Last Post: 06-21-2007, 01:02 PM
  4. Add Columns to query
    By 4petessake in forum Access
    Replies: 0
    Last Post: 06-15-2007, 01:38 PM
  5. Consolidate MDBs
    By RHall in forum Database Design
    Replies: 4
    Last Post: 01-06-2006, 12:31 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