Results 1 to 7 of 7
  1. #1
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12

    Additional Comments field in a report

    Hello,

    I have a field called "Additional Comments" in a table/form that I would like all responses to populate in a report field. I have tried using "=[Additional Comments]" and only one comment is populated in the report field. But I need all of the comments appended and populated in the field, preferably separated on different lines. I have tried using "=ColumnHistory([Table Name], [Additional Comments], [?]) But I am not sure what to use for the query string so the command is resulting with an error. Is there an easy way to populate the report field with all Additional Comments to a table/form? Preferably without a query if possible?

    Thank you

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    If they are all separate records then I use Allen Brownes Concatenate function.?
    the DBguy also has a similar feature called SimpleCSV I believe.

    Allen's is easy to find http://allenbrowne.com/func-concat.html

    I cannot post more than one bloody url on this site easily


    theDBGuy's is http://www.accessmvp.com/thedbguy/co...itle=simplecsv
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  4. #4
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Can you try to add code to the Format event of the detail (or whatever section the AdditionalComments text box is):

    Code:
    Me.txtAdditionalComments = Application.ColumnHistory("YourTable", "AdditionalComments", "ID= " & Me.txtID) 'where txtID is a textbox on the report bound to the unique indentifier\PK of the source table
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12
    Quote Originally Posted by orange View Post
    KMulvey,

    What exactly is the recordsource of the report?
    The record source is a table.

  6. #6
    KMulvey is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2019
    Posts
    12
    I tried something similar without the txtID and when generating the report I am asked to enter an ID but I want the field to report text responses across all IDs.

    Quote Originally Posted by Gicu View Post
    Can you try to add code to the Format event of the detail (or whatever section the AdditionalComments text box is):

    Code:
    Me.txtAdditionalComments = Application.ColumnHistory("YourTable", "AdditionalComments", "ID= " & Me.txtID) 'where txtID is a textbox on the report bound to the unique indentifier\PK of the source table
    Cheers,

  7. #7
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    So why did you try it without? You obviously need to replace Me.txtID with your own control name (which I don't know), if you don't have the ID on the report you need to add id (you can hide it if you want).
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

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

Similar Threads

  1. Replies: 3
    Last Post: 04-09-2018, 07:42 AM
  2. Comments Field Refresh - How To Question
    By AJGoodwin in forum Forms
    Replies: 2
    Last Post: 10-03-2017, 01:38 PM
  3. Replies: 21
    Last Post: 09-29-2017, 01:30 PM
  4. Replies: 6
    Last Post: 04-09-2015, 08:57 PM
  5. Adding date stamp to form comments memo field
    By mikehorse in forum Forms
    Replies: 3
    Last Post: 09-18-2014, 12:30 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