Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Crestview Hills, Kentucky, USA
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Data imported into Access 2003 from Excel 2003. In Excel, more text was needed in a cell than would display, so the user split the data down column C in cells C3, C4, and C5.

    In Access we need to combine the data into a single Memo data type field. I understand concatenation for fields in the same record. How can data from a single field spread across several records be combined?

    Thanks,
    Craig.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    [quote name='CraigH' post='780284' date='17-Jun-2009 06:26'].... How can data from a single field spread across several records be combined?

    Thanks,
    Craig.[/quote]
    Probably the most straightforward method is to write a VBA procedure using either DAO or ADO to step through the records and assemble the text string you need. The challenge is figuring out how the records are related. If the relationship is well defined - i.e. there are always three records, they are consecutive, and have a unique ID, then you can use some clever joins to create a query that does a concatenation of fields, but that is unlikely. If a user has been doing things in Excel, they typically don't worry about structure. Bottom line: It's a lot of work. If the number of records is relatively small, it may be more efficient to do the process manually using copy and paste.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •