Results 1 to 6 of 6
  1. #1
    aharown is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    10

    Rich text field: how to make Enter key stay in the field and add a line break

    Seems like a very simple question, but I can't find instructions anywhere. I have several forms with rich text Notes fields. When creating these notes, users want to hit Enter and just add a line. Like a normal Enter key behavior. Instead, Enter exits the field.
    I don't want all fields in the solution to behave this way, just the Notes fields.

    Can anyone advise me on how to do this?


    Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    use CTL-ENTER

  3. #3
    aharown is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    10
    Thanks.
    Forgot to mention in the OP: users want to type normally and not have to remember to hit an awkward key combination to create a new line.
    So.... is there a way to make Enter behave that way?

  4. #4
    SierraJuliet's Avatar
    SierraJuliet is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2017
    Location
    Earth
    Posts
    211
    Your answer for new line of text by pressing enter key.

    First select your text box then go to Property Sheet > Other > Enter Key Behavior = New Line in Field

    Works with plain and rich text boxes.
    Last edited by SierraJuliet; 01-21-2018 at 05:14 PM.

  5. #5
    aharown is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    10
    Perfect! Thanks.

  6. #6
    SierraJuliet's Avatar
    SierraJuliet is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2017
    Location
    Earth
    Posts
    211
    Some VBA exmaples for those in the future that want to add new line in text box with enter key. Just test and adjust for individual circumstances.

    Code:
    Me![txtTextBox].Value = "Line1" & vbNewLine & "Line2"
    
    " & vbNewLine & "
    " & vbCrLf & "

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

Similar Threads

  1. Rich text field not displaying rich text properly
    By CodeLiftSleep in forum Access
    Replies: 4
    Last Post: 01-24-2018, 10:59 AM
  2. Replies: 3
    Last Post: 06-04-2017, 01:02 PM
  3. Replies: 4
    Last Post: 03-11-2014, 06:38 PM
  4. Field auto enter new line on enter event
    By Ruegen in forum Forms
    Replies: 3
    Last Post: 09-17-2013, 09:00 PM
  5. Line Break in Rich Textbox
    By alyon in forum Access
    Replies: 2
    Last Post: 08-15-2011, 01:07 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