Results 1 to 4 of 4
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    Indent and text wrap

    I am using the below code set an indent in a query. This works fine until there is enough text to cause a wrap in the field on the report. How can I get the wrapped text to indent in line with the previous?

    Tasks: IIf(IsNull([SubTaskNum]) And IsNull([SubSubTasknum]),[Task],IIf(Not IsNull([SubTaskNum]) And IsNull([SubSubTaskNum])," " & [Task]," " & [Task]))

    If there is more elegant way, I'm all eyes.

    Thanks
    Wayne

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    you will need to use a memo field set as richtext. Then you can use the html code for indenting

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Ajax,
    The code above dropped spaces, it should be:
    Code:
     IIf(IsNull([SubTaskNum]) And IsNull([SubSubTasknum]),[Task],IIf(Not IsNull([SubTaskNum]) And IsNull([SubSubTaskNum]),"          " & [Task],"                    " & [Task]))
    Output:
    Task
    ..........SubTask
    ....................SubSubTask

    . = 1 space, this site likes to remove spaces.

    Report field Rich Text - easy
    Setting a single indent is easy, but there would have to be 2 types of indents, depending if it is a subtask or a subsubtask. Could HTML code be put in the query IIF code?

    I'd use VBA for <p> and </p>?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    but there would have to be 2 types of indents
    not sure what you mean, I would think you have one indent or two, not a different one

    not sure what the indent code is - see this link where you can construct some example text and see the codes required https://www.access-programmers.co.uk...ight=rich+text

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

Similar Threads

  1. How do I get tables to wrap text?
    By lccrews in forum Access
    Replies: 5
    Last Post: 12-01-2017, 03:03 PM
  2. Need help - Wrap Text in Subform
    By onlylonely in forum Access
    Replies: 7
    Last Post: 08-23-2017, 11:54 PM
  3. Wrap text conditionally
    By devcon in forum Reports
    Replies: 6
    Last Post: 06-12-2012, 12:32 AM
  4. How to indent first line in text box?
    By JimmD43 in forum Forms
    Replies: 2
    Last Post: 05-08-2011, 01:08 AM
  5. wrap text
    By kamolrat in forum Reports
    Replies: 1
    Last Post: 11-17-2009, 01:36 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