Results 1 to 5 of 5
  1. #1
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280

    Accurately aligning text boxes on Access form.

    I have a continuous form with several text boxes side by side. I want them to touch each other with no space between.
    The first is Left 0", Width 3.6" and I want the next to be Left 3.6", Width 1"
    However, when I try to set the position of the second box to 3.6" it sets it as 3.6146".


    There is a minute gap between the boxes and I can see a tiny dot between them on the form.
    The boxes have Solid Hairline border and I have set the Left and Right Margin to zero, but this does not seem to make any difference.

    One more curious thing - when I click on any of the boxes in design mode, there is a dotted line around both - as if they are connected somehow - see attached image. Can't explain this either.
    Click image for larger version. 

Name:	Capture.JPG 
Views:	16 
Size:	57.8 KB 
ID:	47428

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The dotted line means these controls are in a grouped layout. Form and report build wizards do this by default. If you want to remove, select all controls in group by clicking the cross in upper left then over any control right click > Layout > Remove Layout.

    I have no problem setting these Left and Width specs.
    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.

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Tips for when controls are selected in design view and are not part of a layout group:
    - you can make small position moves with arrow keys
    - you can make much smaller moves with ctrl + arrow keys
    - you can make small width/height changes with Shift + arrow keys
    - you can make much smaller width/height changes with Shift+Ctrl+arrow keys

    I don't know if the grid settings have any effect when doing this - I have my grid set at the max as it affords me the most control when dragging controls.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Save a ton of time. Use the provided tools:



    Click image for larger version. 

Name:	context.png 
Views:	14 
Size:	35.1 KB 
ID:	47429 Click image for larger version. 

Name:	ribbon.png 
Views:	15 
Size:	52.7 KB 
ID:	47430
    Last edited by davegri; 03-12-2022 at 11:38 PM. Reason: layout

  5. #5
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    280
    Thanks for all of your replies. Most helpful. I was not aware of the grouping other than for Radio buttons etc.
    I seem to have two boxes in a group and the rest not. I don't remember putting any in a group - perhaps it happened when I recently migrated from Office 2007 to Office 365.
    Probably they should all be in a group - will research this further.
    Anyway, when I removed the grouping, I found I could accurately set the second box to Left 3.6", so the extra 0.0146" seems to be something to do with the grouping.
    So problem solved and will mark the thread closed.

    Regarding the alignment and spacing tools, yes I use these a lot and they are very useful.
    Always more to learn.

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

Similar Threads

  1. Aligning label text to Align Justified
    By VicLetran in forum Reports
    Replies: 9
    Last Post: 04-02-2018, 02:46 PM
  2. Aligning Tick Boxes With Labels
    By Chris Waller in forum Forms
    Replies: 8
    Last Post: 10-20-2014, 02:29 AM
  3. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  4. Replies: 10
    Last Post: 02-25-2014, 06:09 PM
  5. Aligning email message text when using SendObject
    By msoares in forum Programming
    Replies: 1
    Last Post: 02-15-2011, 07:22 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