Results 1 to 14 of 14
  1. #1
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249

    Easy way to center something in Design View?

    Is there an easy way to center something in Design View? I have two labels one on top of the other that I would like to be centered on the page and centered to each other. There does not seem to be a simple way to center the first label to the page and then the second label to the first. Is this basic layout option missing from Access 2016, or am I just missing something?





    Edited to correct my typos.
    Last edited by Etoimos; 04-08-2020 at 09:46 AM.

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    On the ribbon select Arrange. Highlight both labels and away you go!
    Also checkout Format Painter on the ribbon Home tab.
    Last edited by davegri; 04-07-2020 at 11:02 AM. Reason: add format painter

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,792
    In addition, make sure the control(s) are not part of a group. If you move one in a group, you'll move them all. You didn't say much about the difficulty you're having, so I thought that might be pertinent.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by davegri View Post
    On the ribbon select Arrange. Highlight both labels and away you go!
    Also checkout Format Painter on the ribbon Home tab.
    There is nothing on the Arrange tab that will let me center anything. Maybe the option is just not on my ribbon?

    Quote Originally Posted by Micron View Post
    In addition, make sure the control(s) are not part of a group. If you move one in a group, you'll move them all. You didn't say much about the difficulty you're having, so I thought that might be pertinent.
    That's not my issue, but that is good info none the less. Thanks.

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    There is nothing on the Arrange tab that will let me center anything. Maybe the option is just not on my ribbon?
    See this imageL

    Click image for larger version. 

Name:	araange.png 
Views:	26 
Size:	60.3 KB 
ID:	41493

  6. #6
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by davegri View Post
    See this image

    Yep, I've got that. But neither the Size/Space or Align have an option to center anything. Size and Space just controls the distance between the objects. Align gives the option of To Grid, Left, Right, Top and Bottom. No centering there either.

  7. #7
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Quote Originally Posted by Etoimos View Post
    Yep, I've got that. But neither the Size/Space or Align have an option to center anything. Size and Space just controls the distance between the objects. Align gives the option of To Grid, Left, Right, Top and Bottom. No centering there either.
    Well, if you're talking about centering of controls on the form, then no, there's no built in provision for that. If talking about centering text in controls, the Format Painter will copy the properties of one control to another.

  8. #8
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by davegri View Post
    Well, if you're talking about centering of controls on the form, then no, there's no built in provision for that. If talking about centering text in controls, the Format Painter will copy the properties of one control to another.
    I am talking about centering controls (that's the correct term, not objects. I'm slowly learning the program and lingo), centering the text in controls is straight forward. I find it kind of odd that MS would leave this out considering it is just about every other Office product that they have. Thanks for looking into this for me.

  9. #9
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,792
    Hmmm, interesting request. In all my years of Access, I've never had the inclination to center a bunch of controls. Usually they're right or left aligned with something. I guess the way I'd approach it is to select a pair (one of them being in the position that all others will compare to) and see what the misalignment of the center resizing handles are. Then depending on the amount, I'd either right or left arrow (assuming we're talking about horizontal movement) or Ctrl + arrow to move it a minor amount. IIRC, it's about 3 ctrl+arrows equals 1 arrow alone. With a bit of practice, you could move things around easier than you probably can by dragging with the mouse. I realize that's not what you wanted, but it might make movement easier than you're finding it to be with the mouse. Mouse movement seems to be influenced by the grid, whereas ctrl+arrow isn't.

  10. #10
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    you can centre a control on the form window with a bit of vba code in the form resize event

    mycontrol.left=(insidewidth-mycontrol.width)/2

    edit: missed the brackets

  11. #11
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Micron View Post
    Hmmm, interesting request. In all my years of Access, I've never had the inclination to center a bunch of controls. Usually they're right or left aligned with something. I guess the way I'd approach it is to select a pair (one of them being in the position that all others will compare to) and see what the misalignment of the center resizing handles are. Then depending on the amount, I'd either right or left arrow (assuming we're talking about horizontal movement) or Ctrl + arrow to move it a minor amount. IIRC, it's about 3 ctrl+arrows equals 1 arrow alone. With a bit of practice, you could move things around easier than you probably can by dragging with the mouse. I realize that's not what you wanted, but it might make movement easier than you're finding it to be with the mouse. Mouse movement seems to be influenced by the grid, whereas ctrl+arrow isn't.
    In this case, I simply want the name of the form (I created it as a label as I hate dealing with Headers) centered at the top and then another label centered right underneath it. The rest of the controls are laid out on the form is a manner to move logically down the form. The ctrl+arrow is a really good tip to know, so thanks for that one!

    Quote Originally Posted by Ajax View Post
    you can centre a control on the form window with a bit of vba code in the form resize event

    mycontrol.left=(insidewidth-mycontrol.width)/2

    edit: missed the brackets
    Thanks Ajax, that's good to know as well.

  12. #12
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Make your Labels as wide as the Form itself...then set the text alignment of them to 'centered.'

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  13. #13
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Missinglinq View Post
    Make your Labels as wide as the Form itself...then set the text alignment of them to 'centered.'

    Linq ;0)>
    That's brilliant! So simple, why did we not all think of that! lol

  14. #14
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,792
    So simple, why did we not all think of that!
    Because we didn't know exactly what it was you wanted until you told us:
    I simply want the name of the form (I created it as a label as I hate dealing with Headers) centered at the top and then another label centered right underneath it.
    As soon as I read that, the same answer came to me before I saw Linq's post.

    What matters is that your issue is solved and you learned a couple of things. Good luck with your project!

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

Similar Threads

  1. Replies: 10
    Last Post: 02-06-2018, 02:37 PM
  2. Replies: 6
    Last Post: 05-09-2014, 09:03 AM
  3. Replies: 6
    Last Post: 03-08-2014, 12:47 PM
  4. Replies: 5
    Last Post: 12-03-2013, 01:25 PM
  5. How easy would this design be?
    By UserJohn7673 in forum Database Design
    Replies: 4
    Last Post: 09-01-2012, 04:12 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