Solved Align label to a can grow control? (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 01:02
Joined
Sep 21, 2011
Messages
14,238
Hi all,
I am tweaking my Bibby Line reports to add some more info re Ships.
I have added two controls and their labels. Controls are txtHistory and txtAfterBibby with labels prefixed with lbl instead of txt.
The controls are set to Can Grow and Can Shrink as the amount of data can vary, with some having no data.

However even after setting the top of label and it's control to be the same, when the control grows, the lable appears at the bottom of the control, not remain at the top?

Please see design and print preview pics below.
So how do I get the labels to stay at the top left of the control, where they are in design mode, and not move to the bottom left of the control?

TIA
1633862247432.png
1633862398582.png
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:02
Joined
Feb 19, 2013
Messages
16,610
Confused - you say the label is aligned to the top, but your screenshot isn’t showing that unles the line to the right is a 0 height.

If that is the case, set the height to the same height as the label
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:02
Joined
Sep 21, 2011
Messages
14,238
The label and control both have Top with the same value?
Label for History is 0.8333" and control is 0.8326"
Label for AfterBibby is 1.0104" and control is 1.0097"

Even when I copy and paste values from label to control, Access amends them slighly. I can live with that, as the margin is small.
It is the fact that the label moves to the bottom of the control ?

So I expect
Code:
History: History starts here and goes on and on
         and continues like this
         until the end ?
 

isladogs

MVP / VIP
Local time
Today, 01:02
Joined
Jan 14, 2017
Messages
18,209
Unable to replicate your issue. Are you using layout guides? If so try, removing them

EDIT: I have managed to reproduce your problem by reducing the textbox height to zero in design view (so it looked like a line as in your screenshot. The caption then appeared below the textbox as in your example. I think I can explain why that is.

However I would never do that normally
Once I restored the textbox to anything greater than zero e.g. same height as label, the label aligned with the top of the textbox
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 01:02
Joined
Sep 21, 2011
Messages
14,238
Unable to replicate your issue. Are you using layout guides? If so try, removing them
Not that I am aware of?
Just tried one in my test db and that comes out as I'd expect?
1633865511732.png
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:02
Joined
Sep 21, 2011
Messages
14,238
I do not appear to have, as when I select a control and then Arrange tab, the Remove icon is disabled.?
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:02
Joined
Sep 21, 2011
Messages
14,238
Unable to replicate your issue. Are you using layout guides? If so try, removing them

EDIT: I have managed to reproduce your problem by reducing the textbox height to zero in design view (so it looked like a line as in your screenshot. The caption then appeared below the textbox as in your example. I think I can explain why that is.

However I would never do that normally
Once I restored the textbox to anything greater than zero e.g. same height as label, the label aligned with the top of the textbox
Nice one Colin. (y)
The controls are set as 0 to start with. Setting them to 0.1 gets it back as expected.

Thank you.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:02
Joined
Feb 19, 2013
Messages
16,610
The controls are set as 0 to start with. Setting them to 0.1 gets it back as expected.
as suggested in post #2 :)
 

Users who are viewing this thread

Top Bottom