Vertical Alignment (Or aligning text in a text box)
This tip on vertical alignment is a suggestion from one of Simply-Access tips subscribers.
If we make a text box on a form, the text alignment is always/by default Top and Left. For good looks of a form, generally we drag the corner of the text box to increase the height of the text box, in that situation the text left & top alignment does not looks good, it seems it is in corner. I wanted the textbox vertical text alignment to be in center. I was unable to do so.
To explain you the exact need of mine, I will take your attention to MS Excel worksheet. If we increase the height of a cell, then to adjust its vertical text alignment we go through the process below: Format - Cells - Alignment - Vertical option - and we select Center. This is the thing which I want for my text box on my form for a better look.
You are correct, there is not a simple way to do this in Microsoft Access, but it can still be done. You need to open the property window for the text box in question. You can do this by right-clicking on the text box and selecting ‘Properties’ from the list provided.
With the properties window open, click on the ‘Format’ tab.
You are interested in the following properties:
Text Align – Change to Centre
I know this does not help with the vertical alignment. To fix this, keep scrolling down until you find the property, ‘Top Margin’. This property positions the text a certain height from the top of the text box. Set this property to make your text appear as though it is centred vertically. It may take a bit of trial and error to get it correct. Not as simple as Excel, but achievable.
Finished with Vertical Alignment click here to go back to 'Forms'
Go to Simply Access Home Page