Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

2 views
Skip to first unread message

wolbruin

unread,
Nov 10, 2009, 4:27:44 PM11/10/09
to
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.

Thanks

EggHeadCafe - Software Developer Portal of Choice
HTML Hyperlink Obfuscation with Client Script
http://www.eggheadcafe.com/tutorials/aspnet/0c2c6656-9c94-464b-aa93-371cf317efc5/html-hyperlink-obfuscatio.aspx

KARL DEWEY

unread,
Nov 11, 2009, 11:52:01 PM11/11/09
to
Open in design view, click on Property Sheet and format property Text Align
sekect Center.
--
Build a little, test a little.


"Wol Bruin" wrote:

> .
>

Gina Whipp

unread,
Nov 12, 2009, 12:39:26 AM11/12/09
to
Karl,

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
II

http://www.regina-whipp.com/index_files/TipList.htm

"KARL DEWEY" <KARL...@discussions.microsoft.com> wrote in message
news:4A2E3651-9526-44F8...@microsoft.com...

0 new messages