Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    How to move only labels and not textboxes when designing a form

    This has been driving me nuts.
    I want to move all the labels left, but leave the textboxes where they are.


    They both move, no matter what I try.
    Do I have to clear the "Label Name" for the textbox first to get this done. What else is affected if I do this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Did you try click/grab/drag the anchor block at upper left of label?
    Last edited by June7; 08-05-2022 at 08:39 AM.
    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
    Join Date
    Apr 2017
    Posts
    1,679
    When creating a new form, I usually select all labels, cut them all (Ctrl + X), paste them back (the block of pasted labels will be situated in left upper corner of form), and then drag label block back to (approximately) previous location. After that I can continue with design at will - labels aren't connected to controls anymore.

  4. #4
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    If you move one label to the desired position (Using June's method) , you can then group them all and Align Left(or Right depending on where you moved them) and they will align independently of the controls they are associated with.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    The suggestions miss the point

    The whole point is that I move a block of existing fields into the form, I like where I placed them for the most part,
    I just need to adjust the labels for the largest label, and then do the same with the textboxes.
    Nothing magical or illogical here.
    It seems crazy to disassemble a group of fields then reassemble them again just for placement.
    This is the kind of time wasting activity that Access encourages that I hate.
    Even crazier if you have to "break" the associated label for a text box control.
    Why have that property in the first place if you have to defeat it just to move only a label?


    So, there is no easy way to just select and move only the labels?

  6. #6
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by Minty View Post
    If you move one label to the desired position (Using June's method) , you can then group them all and Align Left(or Right depending on where you moved them) and they will align independently of the controls they are associated with.
    I tested this suggestion every way I can think of, I can't get the labels to move independently.

    Update: Okay, I finally figured a way to do this without leaving orphan text boxes all over the form. Thanks for the suggestion, but good grief Microsoft! Maybe move with shift, or ctrl, or alt or something to allow this basic movement of only labels?

    To answer the other part of the question, what does this label name property do? Well I pressed F1, and guess what happened?
    (It's bad enough I can't get offline helps, but when I'm using my precious online {connected by my celular} I get ...)
    Last edited by twgonder; 08-05-2022 at 04:48 AM. Reason: success with idea

  7. #7
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    It's simple if you you use the align tools, select the controls or labels you want.
    Right click and size to widest/narrowest.
    Right click again and align left or right. It will only move the object you have selected on their own, not with the associated label or control .
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #8
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Does this explain it better?
    Click image for larger version. 

Name:	8-05-2022 (11-38-31).gif 
Views:	27 
Size:	193.5 KB 
ID:	48450
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    In Design View of the Form Select all Controls & Labels required.

    From the Menu select - "Arrange" - Then Click "Remove LayouT"

    You are then able to Move/Resize labels as necessary
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  10. #10
    Join Date
    Apr 2017
    Posts
    1,679
    Quote Originally Posted by twgonder View Post
    Even crazier if you have to "break" the associated label for a text box control.
    Why have that property in the first place if you have to defeat it just to move only a label?
    So you can easily recognize, which label belongs to which control, when you create the form using wizard
    To break 'associations' takes only couple of tens of seconds. I spend much more renaming every one of them, because I prefer label names in format lblControlName

  11. #11
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by Minty View Post
    Does this explain it better?
    Yes it did, it took me awhile without it, but I got there.
    The next person with the same problem will greatly benefit from your effort.

  12. #12
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by ArviLaanemets View Post
    So you can easily recognize, which label belongs to which control, when you create the form using wizard
    To break 'associations' takes only couple of tens of seconds. I spend much more renaming every one of them, because I prefer label names in format lblControlName
    Is there no downside to breaking the association?

  13. #13
    Join Date
    Apr 2017
    Posts
    1,679
    Quote Originally Posted by twgonder View Post
    Is there no downside to breaking the association?
    None! Anyone can do it in way he/she likes it!

  14. #14
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    Quote Originally Posted by ArviLaanemets View Post
    None!
    I disagree. You lose the ability to refer to the control's control collection. This collection only has one member - the label, whose index is 0. Where this comes in handy is for things like form validation where you loop over a bunch of controls (often using control tag property to group controls for validation). If you prompt user with

    Msgbox "Please enter a value in the " & ctl.Name & " field"

    you can get a message that says "Please enter a value in the txtCustName field" - not very intuitive. However, labels almost always have meaningful descriptions for the use of the field. Using

    Msgbox "Please enter a value in the " & ctl.Controls(0).Caption & " field" will use the label caption instead. There might be other reasons one would benefit from the connection but none come to mind at present.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    twgonder is offline Expert
    Windows 10 Access 2016
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by Micron View Post
    I disagree. You lose the ability ... form validation where you loop over a bunch of controls (often using control tag property to group controls for validation). If you prompt user with

    ...
    That little bolded part caught my attention! I've been testing a solution for multi-language that used the tag property in forms and report captions, command buttons and maybe some other controls I haven't yet figured out. The article and sample db for this translation scheme was written many years ago. I've had concerns that the way tagged was used to hold a translation key could be problematic if future applications use that tag property, or if Microsoft decides to change or remove it.

    And now you talk about using it for validation (I'm not sure what you're referring to there), but if tag was overwritten, my whole translation scheme is destroyed unless I have a way to save and restore all those tags in the tag property of forms and reports.

    But first, in the current versions of access, or with common utilities that people use, is there an reason to NOT use the tag property for storing the translation codes? Has Microsoft added any optional "user" fields to the objects, so that users can have their own protected area for this kind of storage? If so, how can those be made visible?

    If it's a bad idea to use Access properties for storing something like this translation code, then I need to go in the reverse direction create a table of translations that allows a filling of the caption property based on some unique data in the other properties of labels and buttons.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-11-2014, 11:26 AM
  2. All Textboxes Read-Only on Form
    By cbrsix in forum Programming
    Replies: 5
    Last Post: 04-16-2013, 01:47 PM
  3. Replies: 5
    Last Post: 08-28-2012, 03:23 PM
  4. Form - CANNOT EDIT TEXTBOXES !!!
    By dbalilti in forum Access
    Replies: 5
    Last Post: 07-05-2012, 12:15 PM
  5. Replies: 14
    Last Post: 07-19-2011, 04:00 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