Results 1 to 5 of 5
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192

    Line spacing

    In Access 2016, if one sets to rich text the "Text Format" property of text box in form design then the "Line Spacing" property of this text box is ignored. Are there any way to adjust the line spacing?



    thanks

    Alex

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    Line spacing is a plain text property, not a rich text property. Richtext is now a html format.

    So far as I can see there isn't the option in richtext formatting so I suspect it isn't supported, but in principle so you would need to replace the <p> marker with something like <p style="line-height:1.5"> where 1.5 is the increase in the font height i.e. a font height of .8cm would become 1.2cm

    However don't know if this would work with the richtext environment of access. Suggest create some text in an html document with the spacing and copy paste to your richtext control. If it works, in layout change the property to plaintext to see the html code used. I just tried copying something from word but it uses different code that the richtext control does not recognise so ignores.

    If you get that far you would then need to use the replace function, possibly in the change event, to modify the .text property of the field

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Line spacing is a plain text property, not a rich text property
    According to the link, it's a property of a textbox which means it ought to work.
    https://docs.microsoft.com/en-us/off...ox.linespacing

    However, there is a 12 year old post here by M$ that says it appears to be a bug.
    https://social.msdn.microsoft.com/Fo...novateonoffice
    Typical follow up from M$, I guess.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    Interesting that Micron's first link is only a couple of weeks old - wonder if it is something now solved in the latest access version?

    I found one earlier that stated that it was a plaintext/rtf (i.e. 2003 memo field) property, but can't find it now

    This link

    https://www.experts-exchange.com/que...e-Spacing.html

    has a discussion on it where the OP has not been clear about the requirement - i.e. all lines 'spaced' which is what the original function does or pre/post paragraph or as and when required

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Well I tried that & it didn't work for rich text.
    In fact I don't see how it could work as the line spacing is automatically updated according to the largest font size in a particular line.
    So I think the rich text property takes precedence over the line spacing property.

    Another useful link: https://www.experts-exchange.com/que...e-Spacing.html

    For info, just because a property is listed, doesn't mean it is available,
    For example the textbox.postaladdress property has no effect (except apparently in Japan)

    On a completely separate note, I'm having issues with listed references that it seems impossible to use in Access e.g. Windows Geolocation Service 1.0 library.
    Although listed, ticking it gives "error in loading DLL"
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 1
    Last Post: 04-06-2019, 12:59 PM
  2. Replies: 5
    Last Post: 07-16-2017, 01:48 AM
  3. Line spacing issue in Access 2010 reports
    By rebfein in forum Reports
    Replies: 2
    Last Post: 07-05-2016, 12:07 PM
  4. line spacing in access 2010
    By Alexander Pooh in forum Access
    Replies: 5
    Last Post: 08-15-2012, 08:13 AM
  5. Replies: 1
    Last Post: 01-12-2012, 02:54 AM

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