Is there a way to center (horizontally) items in a list box?


Wol Bruin

I want each individual item in the list box to be centered horizontally. I don't see any properties that allow me to do this, nor any VBA code I can apply. When I tried adding leading blanks and using a fixed font such as Courier New, Access would trim off the leading blanks and left justify the text.
I am using MS Access 2007.


EggHeadCafe - Software Developer Portal of Choice
HTML Hyperlink Obfuscation with Client Script


Open in design view, click on Property Sheet and format property Text Align
sekect Center.

Gina Whipp


You can't center text in a list box... but I found something you posted a
little back that works like a charm...

SELECT Space(15-len([FieldName])/2) &[FieldName] FROM [TableOrQueryName];

Note, you may have to play with the * -15 * depending on the width of your
list box.

Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question