Results 1 to 7 of 7
  1. #1
    BakerMan is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    16

    Line Break In My Forms List Box

    Hello. I would like to add line breaks in my forms List Box. The spaces need to be inserted into the table column data cells between text if possible. See screenshot of what I would like to accomplish. (made my example with mspaint) Thank you.



    Click image for larger version. 

Name:	form1.PNG 
Views:	24 
Size:	11.7 KB 
ID:	38414

  2. #2
    Minty is offline VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    What is the purpose, it sounds like it's simply for presentation like an excel sheet? You don't/shouldn't store blank records just as a presentation aid?
    And are they really list boxes or simply large text boxes ?

    If you insert a blank record what happens when someone selects it?

    If it's just text then add a VbCrLf & VbCrLf to each item.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    BakerMan is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    16
    To confirm, yes it is a list box, and i need the spaced inserted between information in a single "cell" it doesnt have to be a space in the table data per say, it just needs to show the formatting in out output of the forms list box. Hope that makes sense. Thank you.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if you are going to enforce formatting you would have to make your list a value list as opposed to a table/query ROW SOURCE TYPE property. Then insert the value in to the list when you perform your search using a method like:

    https://docs.microsoft.com/en-us/off...istbox.additem

    You will have to arrive at some sort of rule to properly separate your data into separate lines though.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Why a listbox? Do you still want items selectable?
    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.

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    Or use a continuous subform instead. Can be made to look like a listbox and you can adjust the detail height section to provide space

  7. #7
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I agree, if you're going to try and format your text a list box is not the best way to do it.

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. Unbound Text Box with line break
    By DCV0204 in forum Forms
    Replies: 3
    Last Post: 01-24-2014, 09:32 AM
  3. macro message box - line break
    By tweety in forum Access
    Replies: 3
    Last Post: 04-05-2013, 05:17 PM
  4. How to make a subform break line?
    By newyorkyankee in forum Forms
    Replies: 1
    Last Post: 11-01-2012, 12:18 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