Results 1 to 4 of 4
  1. #1
    DCV0204 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    85

    Unbound Text Box with line break


    Hi, I have a form that I am creating to look like a letter. I am need to add line breaks in the unbound text field; is this possible on a MS Office 2007 Form?
    I have this so far:
    =[Provider_FName] & " " & [Provider_MInitial] & " " & [Provider_LName] &(Need LineBreak Here) [Address]) & (Need LineBreak Here)[Address2] & (Need LineBreak Here)[City] & ", " & [State] & " " & [Zip] & [Zip4]

    Thanks,
    Lisa

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Wherever you need a line break, use the VB value vbCrLf (Carriage Return - Linefeed). vbCrLf is a two-character string containing chr(13) & chr(10). This will give you the line breaks you need.

    e.g [address2] & vbCrLf & [City].

    John

  3. #3
    DCV0204 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    85
    Thanks for your response. That did not actually work for me because I am adding the sql in an unbound textbox and not vb.
    However, I did figure it out.
    Thanks,
    Lisa

  4. #4
    Gina is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    10
    Hi Lisa,

    In the Properties box of the Unbound Text Box change the format from Plain Text to Rich Text and add the <br> tag as shown below.

    =[Provider_FName] & " " & [Provider_MInitial] & " " & [Provider_LName] & '<br>' & [Address]) & '<br>' & [Address2] & '<br>' & [City] & ", " & [State] & " " & [Zip] & [Zip4]

    Hope this helps.
    Gina

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

Similar Threads

  1. Line Break in Textbox
    By alyon in forum Access
    Replies: 8
    Last Post: 02-16-2015, 10:21 AM
  2. How to make a subform break line?
    By newyorkyankee in forum Forms
    Replies: 1
    Last Post: 11-01-2012, 12:18 PM
  3. Replies: 2
    Last Post: 06-11-2012, 09:37 AM
  4. Irritating line-break problem after export to txt
    By Ivanho in forum Import/Export Data
    Replies: 7
    Last Post: 08-19-2011, 07:59 PM
  5. Line Break in Rich Textbox
    By alyon in forum Access
    Replies: 2
    Last Post: 08-15-2011, 01:07 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