Disassociate label from control (1 Viewer)

wingforward

Registered User.
Local time
Today, 13:38
Joined
Nov 24, 2009
Messages
27
OK, so I've come across the "combo box background color" bug in Access 2007 and I'm wondering if there's a quick and easy way to disassociate a label with a control. It seems that solves it.

Thanks,
DJ
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 12:38
Joined
Aug 30, 2003
Messages
36,133
Try selecting the control, right-click and select Layout/Remove.
 

wingforward

Registered User.
Local time
Today, 13:38
Joined
Nov 24, 2009
Messages
27
Thanks for the reply, but that doesn't work. There is no option to Remove, it's grayed out. My understanding is that Remove works to stop the label and control from moving together, but they are still associated with one another.

What does work is to click the label and cut and paste it and reposition it. But I'm looking for a simpler way to deal with the 20 or so combo boxes I need to fix.
 

ajetrumpet

Banned
Local time
Today, 14:38
Joined
Jun 22, 2007
Messages
5,638
another way is to get rid of all the labels, then make a new one and press the Ctrl+V on your keyboard 20 times. that's the way I do it for quick and easy access
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 05:38
Joined
Jan 20, 2009
Messages
12,856
The Layout menu is used to group or ungroup controls so they move together. It doesn't affect the association between a control and its label.

I have often wondered where the association between the Label and Control is held.
I assume it is not a Property as such but like the layout grouping it is part of the program.

Access will detect an unassociated label and offer to associate it but I cannot find anywhere to break that association. Like wingforward I just copied and pasted.

Incidentally I did discover something useful while trying everything.
Controls and labels can be locked into vertical or horizontal movement when being dragged by their anchor.
Shift will lock the horizontal position while Shift + either Ctrl or Alt will lock the vertical position. (You must press Shift first).
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 12:38
Joined
Aug 30, 2003
Messages
36,133
Sorry, misread the question. I don't know of a way to do it either.
 

Jake2

New member
Local time
Today, 15:38
Joined
Jul 22, 2023
Messages
10
Thanks for the reply, but that doesn't work. There is no option to Remove, it's grayed out. My understanding is that Remove works to stop the label and control from moving together, but they are still associated with one another.

What does work is to click the label and cut and paste it and reposition it. But I'm looking for a simpler way to deal with the 20 or so combo boxes I need to fix.
The only other option I found is to change to a text box, then change back to a label. You will have to replace the caption, however.
 

mike60smart

Registered User.
Local time
Today, 20:38
Joined
Aug 6, 2017
Messages
1,916
The only other option I found is to change to a text box, then change back to a label. You will have to replace the caption, however.
This is a 14 year old thread?
 

isladogs

MVP / VIP
Local time
Today, 20:38
Joined
Jan 14, 2017
Messages
18,261
This is a 14 year old thread?

It is indeed but there is now a solution to this issue.
In recent versions of Access, textboxes have a Label Name property under the Other tab of the property sheet.
To disassociate the label from the textbox, clear its name from that property.

The same method also works for labels associated with combo boxes, list boxes, option groups and option buttons and for check boxes. In fact, for any control where a label is created automatically....except for subforms
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:38
Joined
Feb 19, 2002
Messages
43,484
Set the Label Name to null or "". I've never done this with code so I'm not sure which will work.
1694897888892.png
 

Users who are viewing this thread

Top Bottom