Results 1 to 5 of 5
  1. #1
    LMH is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Location
    Pittsburgh, Pa.
    Posts
    2

    Is it possible for text boxes to automatically align to each other horizontally?

    Hello, I am new to using Access and apologize if I'm not using the correct terminology. I am trying to create a report where a field is inserted in the center of a title. Specifically, the following:



    In the Court of Common Pleas of [County Name] County, Pennsylvania

    So my text box layouts are as follows:

    [In the Court of Common Pleas of] [Field = County Name] [County, Pennsylvania]

    Since the county name will change in length, I'm hoping there is a way to have the last text box automatically align to the size of the field. I've already enabled the can grow and can shrink functions on both. But I'm still getting the following.

    In the Court of Common Pleas Mercer ___________ County, Pennsylvania (unwanted space)

    In the Court of Common Pleas of Alleghe County, Pennsylvania (not enough space). In this example, I want "County, Pennsylvania" to move down to the next row.
    ___________________________ny

    I've checked my reference book and searched the web, but no answers. Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How about a textbox control source of:

    ="In the Court of Common Pleas of " & [County Name] & " County, Pennsylvania"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    LMH is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2018
    Location
    Pittsburgh, Pa.
    Posts
    2

    Thanks, solved

    Wow, yes, this is a much better way to approach the problem. Thanks for helping a newbie out.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    FYI - Can Grow & Shrink refers to the vertical height, not width, and if I'm not mistaken, only applies in print preview or actual printing. I don't bother much with report view, so am not positive.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by LMH View Post
    Wow, yes, this is a much better way to approach the problem. Thanks for helping a newbie out.
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Using DoCmd Alight Right to align text in a textbox
    By Access_Novice in forum Programming
    Replies: 1
    Last Post: 12-29-2013, 02:55 PM
  2. Text Boxes Grow Horizontally
    By dvgef2 in forum Reports
    Replies: 4
    Last Post: 03-28-2013, 06:42 AM
  3. Replies: 1
    Last Post: 03-27-2012, 12:23 AM
  4. Align text in a field column.
    By israellawndale in forum Access
    Replies: 1
    Last Post: 08-16-2011, 06:18 PM
  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