Home
What is MS Access
Tables
Forms
Queries
Reports
VBA Codes
Learn VBA
Access 2007/10
Access 97
Tips via email
Whats New!
Contact Me
Questions Answered

[?] Subscribe To This Site

XML RSS
Add to Google
Add to My Yahoo!
Add to My MSN
Subscribe with Bloglines

Simply Access Logo

Vertical Alignment (Or aligning text in a text box)

This tip on vertical alignment is a suggestion from one of Simply-Access tips subscribers.

Question

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.

Answer

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'

or.....

Go to Simply Access Home Page


Search Simply Access

Custom Search


Want to learn more for free.

Sign up for Simply Access 'Microsoft Access Tips'. Free useable tips to your in-box each month.

Enter your E-mail Address
Enter your First Name (optional)
Then

Don't worry -- your e-mail address is totally secure.
I promise to use it only to send you Microsoft Access Tips.



If you wish to learn VBA to expand the possibilities of Microsoft Access then

Click Here Just $7.95 for 56 lessons.