Results 1 to 7 of 7
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479

    How can I put chr$(10) into an Access 2019 table ?


    It isn't visible in the table itself. It was in earlier Access versions.

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    I don't recall that, but won't say it wasn't. Question is, it's a non-printable character so what would be the point? If it was ever visible, it makes sense to me that they got rid of it. Why would you want this?
    Last edited by Micron; 06-11-2024 at 08:34 PM. Reason: repetition
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479
    I'm using Access to store data and Excel connects to it and uses chr$(10) as a linefeed in pop-up comments.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I have 2010 and AFAIK, neither Chr(10) nor Chr$(10) show as visible characters in field. If you literally see "Chr$(10)" then you see text, not LF character.

    I tried to UPDATE a field with just Chr(10) and get bad results. Only combination of Chr(10) & Chr(13) shows new line in string.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479
    The Access version number I forget but it showed as a little black square. Not chr$(10) as text.
    It can be added with Update once setting somewhere for it
    Set t = CurrentDb.OpenRecordset("Select ff from Table1;")
    t.Edit
    t(0) = Replace(t(0), ".xx ", "." & vbLf)
    t.Update

    But then you cannot even edit a field with it in... the weirdest things happen.

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,425
    I'm using Access to store data and Excel connects to it and uses chr$(10) as a linefeed in pop-up comments.
    Can't you get what you want by making the table field long text and format as rtf? The cr/lf would be embedded and carry over to Excel. At least I think so.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    RTF uses html tags. I don't think Excel will interpret the tags.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Send SMS using Access 2019
    By Raveen1609 in forum Access
    Replies: 3
    Last Post: 10-19-2021, 12:40 PM
  2. Replies: 15
    Last Post: 10-14-2021, 04:48 AM
  3. Replies: 4
    Last Post: 04-08-2021, 05:51 AM
  4. Replies: 9
    Last Post: 02-13-2021, 09:14 AM
  5. MS Access 2019 aesthetics
    By shank in forum Access
    Replies: 1
    Last Post: 10-17-2019, 04:04 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