Results 1 to 7 of 7
  1. #1
    vorngsarorn is offline Novice
    Windows 10 Access 2021
    Join Date
    Mar 2024
    Posts
    9

    Text Box Middle Alignment

    Dear All,



    Hi everyone,


    I'm working on an Access report and I'm trying to achieve the same text formatting as I can in Excel. In Excel, I can easily wrap text and center it vertically within a cell. However, I can't seem to find a way to both wrap text and center text vertically in a text box within Access reports.


    Is there a way to accomplish this in Access, or is there a workaround that would achieve a similar result?


    Any advice would be greatly appreciated!


    Thanks,


    Click image for larger version. 

Name:	Screenshot 2024-03-07 062633.png 
Views:	14 
Size:	33.7 KB 
ID:	51575

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    You could try setting the textbox Can Grow property to yes, then it should word wrap. However, I don't think there is a way to center vertically; not even if you increase the Top and Bottom Padding values for the textbox.

    EDIT -
    I don't think there is a way to center vertically
    I meant by setting control properties since IIRC, there is no option to center text vertically. Maybe by using code to determine the height of every textbox on a row, choose the largest (assuming that is because it expanded) then doing some math to change the position of the rest of them, relative to the position of the expanded one. Too much work for zero payback, even if it works - unless you find some ready to use code.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    vorngsarorn is offline Novice
    Windows 10 Access 2021
    Join Date
    Mar 2024
    Posts
    9
    Thank you and I have try for Can Grow and Shrink property to "YES" also play the Top margin but it's still no luck. As you may say too much work and VBA code might be along with

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Have not investigated this but others have indicated it works
    http://www.lebans.com/verticaljustification.htm
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    vorngsarorn is offline Novice
    Windows 10 Access 2021
    Join Date
    Mar 2024
    Posts
    9
    Thank anyway I will try. Very much appreciated to your kind help.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    You're welcome, and good luck!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Center text in textbox (top, middle,bottom)
    By nemesisswe in forum Access
    Replies: 10
    Last Post: 11-10-2021, 06:27 PM
  2. Distribute text alignment setting
    By jamunak in forum Reports
    Replies: 1
    Last Post: 09-09-2014, 11:20 AM
  3. Need to Remove Varying Middle Text
    By EZRider in forum Queries
    Replies: 4
    Last Post: 10-10-2012, 03:45 PM
  4. Horizontal text alignment
    By jamil_kwi in forum Reports
    Replies: 2
    Last Post: 06-02-2010, 11:50 PM
  5. Extract text from middle of a field
    By AccessNubie in forum Access
    Replies: 3
    Last Post: 11-02-2009, 01:13 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