Results 1 to 3 of 3
  1. #1
    journeyman is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Dec 2022
    Posts
    82

    Combine records into paragraphs

    Hi All,



    I am not sure how to approach this problem. please bear with me.

    I am attempting to collect multiple records into a single query, then output that query to a word document as text.

    Code:
    ---------------
    Apple
    ---------------
    Orange
    ---------------
    Pear
    ---------------
    Into

    Code:
    Apple
    Orange
    Pear
    I suppose I could do a vba loop, but is there a way to write a query that would do this in one stroke?

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    You should look into using a VBA concatenation function, I think the easiest to use in your case is theDBGuy's SImpleCSV():
    http://www.accessmvp.com/thedbguy/co...itle=simplecsv

    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    You'd need code to run the query and output it using rtf format I think.
    https://learn.microsoft.com/en-us/pr...3(v=office.11)
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Inserting paragraphs in Body of EMail
    By mike60smart in forum Access
    Replies: 3
    Last Post: 11-26-2020, 03:02 PM
  2. Replies: 5
    Last Post: 06-18-2017, 09:17 AM
  3. Combine records into one row
    By Back2Basics in forum Queries
    Replies: 3
    Last Post: 03-10-2017, 03:36 AM
  4. Replies: 1
    Last Post: 04-06-2016, 09:26 AM
  5. Report Design - Text Box with Paragraphs
    By sren in forum Reports
    Replies: 8
    Last Post: 12-04-2012, 01:39 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