Text Boxes Height needs to match a given text box (1 Viewer)

slick32184

New member
Local time
Today, 10:27
Joined
Dec 8, 2019
Messages
2
Hello

I'm New to Access but I so far made a report that contains 11 text boxes beside each other and the last one is set to Can Grow to yes.

I need a way to make all the textboxes hights match the same size as the biggest one.

Can any help?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:27
Joined
Oct 29, 2018
Messages
21,358
Hi. Welcome to AWF!

Not exactly. What you could do is instead of relying on the Textbox borders, use layout grid lines. Check out this article. Hope it helps...
 

isladogs

MVP / VIP
Local time
Today, 17:27
Joined
Jan 14, 2017
Messages
18,186
If you don't want to use layout guides and the same textbox is always the largest then it would be relatively easy to set the others to the same height
Me.txt1.Height= me.txt2.height = ….= me.talltxt.height

However if the tallest textbox may vary this could get horribly complicated both in terms of logic and page layout.
Alternatively, why not set the height to be the same for all and set can grow =false
 

slick32184

New member
Local time
Today, 10:27
Joined
Dec 8, 2019
Messages
2
If you don't want to use layout guides and the same textbox is always the largest then it would be relatively easy to set the others to the same height
Me.txt1.Height= me.txt2.height = ….= me.talltxt.height

However if the tallest textbox may vary this could get horribly complicated both in terms of logic and page layout.
Alternatively, why not set the height to be the same for all and set can grow =false

Isladogs

Im not sure where do I put this. "Me.txt1.Height= me.txt2.height = ….= me.talltxt.height" what do I do with this?

Can You elaborate please?
 

isladogs

MVP / VIP
Local time
Today, 17:27
Joined
Jan 14, 2017
Messages
18,186
You would use that in the On Format event of the report section where the textboxes are located
e.g. Detail_Format event

Obviously you would need to use the names of your own textboxes with the name of the tallest textbox on the right of the final equals sign.

Hope that makes sense
 
Last edited:

Users who are viewing this thread

Top Bottom