Formatting of columns in a Listbox

D

Dennis

In Access 2003, I have a couple of numeric columns in a listbox that I need
to format as $'s and then right-justify. How can I do that please? (I
apologize for the ignorance of this question, but I've never had to format
data in a Listbox before.)

Thanks!
 
A

Arvin Meyer [MVP]

Dennis said:
In Access 2003, I have a couple of numeric columns in a listbox that I
need
to format as $'s and then right-justify. How can I do that please? (I
apologize for the ignorance of this question, but I've never had to format
data in a Listbox before.)

Not easily done, but fortunately Stephen Lebans has some listbox tricks:

http://www.lebans.com/vb_listbox.htm

http://www.lebans.com/listboxenhanced.htm

or you could just go to Lebans.com and do a search on listbox.
 
S

Stephen Lebans

Hi Arvin,
the specific solution to the OP's issue is here:
http://www.lebans.com/justicombo.htm

New Ver 2.1 Justification.zip is a database containing functions to center
and right justify data for List and Combo Boxes.

Major changes for Version 2.1 are:
Use standard API's instead of functions exposed in Access EXE.

Handle Multiple Columns

One Function for both Center and Right Alignment

Support for controls on SubForms

Huge increase in function execution speed

Clean code with comments


New CboRowSeperator.zip is a database containing a functions to display non
selectable Row dividers in a Combo.

My personal thanks to Terry Kreft for his input and assistance with this
upgrade.



Name: Dan Rock

Comments:

Hi,

Just a little addition to your justification.zip

I wanted to show the right justified column in standard number format so i
replaced the below line and it works great!

Thank you much for your contributions to the programming community.

'let's trim the string - better safe than sorry :)

' strText = Trim$(strText)

strText = Trim$(Format(strText, "###,###.00"))


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

gladys lane

Dennis said:
In Access 2003, I have a couple of numeric columns in a listbox that I
need
to format as $'s and then right-justify. How can I do that please? (I
apologize for the ignorance of this question, but I've never had to format
data in a Listbox before.)

Thanks!
 

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

Top