Results 1 to 10 of 10
  1. #1
    VicLetran is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    16

    Post Aligning label text to Align Justified


    Hi all! I need help on how I would be able to align justified my label text in reports. Please. Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    move the label to where you want it.
    set alignment to : left, right, or center.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Quote Originally Posted by ranman256 View Post
    move the label to where you want it.
    set alignment to : left, right, or center.
    Or set to Distribute which spreads the text to fill the space - rarely any use but its available
    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

  4. #4
    VicLetran is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    16
    Thanks for the reply but it still doesn't work. My text is like a paragraph 5 lines and the last line is only one word. So If I I have to distribute the last word "eligibility".

    My Label is this :

    The said order shall automatically cease upon its expiration as stipulated above, unless renewed. However, services of any or all of the above-named can be terminated prior to the expiration of this Job Order for lack of funds or when their services are no longer needed. The above-named hereby attests that he or she is not related within the third degree (fourth degree in case of LGUs) of consanguinity or affinity to: 1) hiring authority and/or 2) representatives of the hiring agency; that he/she has not been previously dismissed from the government service by reason of an administrative offense; that he/she has not yet reached the compulsory retirement age of sixty five (65). Furthermore, the service rendered is not considered or will never be accredited as government service. That he/she has not been found to possess spurious or fake eligibility.

  5. #5
    VicLetran is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    16
    Thanks for the reply but it still doesn't work. My text is like a paragraph 5 lines and the last line is only one word. So If I I have to distribute the last word "eligibility".

    My Label is this :

    The said order shall automatically cease upon its expiration as stipulated above, unless renewed. However, services of any or all of the above-named can be terminated prior to the expiration of this Job Order for lack of funds or when their services are no longer needed. The above-named hereby attests that he or she is not related within the third degree (fourth degree in case of LGUs) of consanguinity or affinity to: 1) hiring authority and/or 2) representatives of the hiring agency; that he/she has not been previously dismissed from the government service by reason of an administrative offense; that he/she has not yet reached the compulsory retirement age of sixty five (65). Furthermore, the service rendered is not considered or will never be accredited as government service. That he/she has not been found to possess spurious or fake eligibility.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Access does not have sophisticated text formatting capabilities like Word or Publisher. I very much doubt you will have success with this.
    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.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    So If I I have to distribute the last word "eligibility".
    You can't do that
    The entire label has to be formatted in the same way - general/left/right/centre/distributed

    I do complex formatting using code
    If the label is in the detail section, add code similar to this to the Detail_Format event:

    Code:
    Me.MyReportLabelName.Caption = "The said order shall automatically cease upon its expiration as stipulated above, unless renewed." & vbCrLf & _
    "However, services of any or all of the above-named can be terminated prior to the expiration of this Job Order for lack of funds or when their services are no longer needed. " & vbCrLf & _
    "The above-named hereby attests that he or she is not related within the third degree (fourth degree in case of LGUs) of consanguinity or affinity to:" & vbCrLf & _
    "1) hiring authority" & vbCrLf & _
    "and/or" & vbCrLf & _
    "2) representatives of the hiring agency;" & vbCrLf & _
    "that he/she has not been previously dismissed from the government service by reason of an administrative offense;" & vbCrLf & _
    "that he/she has not yet reached the compulsory retirement age of sixty five (65)." & vbCrLf & _
    "Furthermore, the service rendered is not considered or will never be accredited as government service." & vbCrLf & _
    "That he/she has not been found to possess spurious or fake eligibility."
    This would spread it nicely over 10 lines. Adjust the line breaks to suit your needs.
    Change the label name to whatever yours is
    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

  8. #8
    VicLetran is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2018
    Posts
    16
    Thanks for the code. My label is not in the detail section. It is in the footer section. Will I do the same code?

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Yes - just use the Format section containing your label.

    I use the idea regularly including more complicated text strings with function outcomes & it works well
    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

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    Sometimes I use a textbox with an expression to serve as a "label". So VBA would not be needed:

    ="ABC" & Chr(13) & Chr(10) & "DEF"

    Just ran across Lebans utility for justifying which you might find interesting: http://www.lebans.com/xjustifytext.htm
    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.

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

Similar Threads

  1. Text justified on form load
    By Khaled2004 in forum Forms
    Replies: 1
    Last Post: 09-28-2017, 03:59 PM
  2. Replies: 10
    Last Post: 02-25-2014, 06:09 PM
  3. Align text in a field column.
    By israellawndale in forum Access
    Replies: 1
    Last Post: 08-16-2011, 06:18 PM
  4. Aligning email message text when using SendObject
    By msoares in forum Programming
    Replies: 1
    Last Post: 02-15-2011, 07:22 AM
  5. How to vertically align text inside a text box ?
    By alexcalgary in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 08:44 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