Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aligning data in a listbox 3

Status
Not open for further replies.

NvrSaDi

Programmer
Mar 11, 2003
45
US
I have an Access 2000 list box on a form with 5 fields - 3 string and 2 numeric. Data source is a query combining 2 tables. Default alignment is left. I need to retain left alignment of the string data and right align the numbers.
 
AccessDB,
The only way I know to do this:[ol]
[li]Convert all the fields to text ([tt]Format$[/tt] the numbers).[/li]
[li]Pad the text values of all the fields you want right justified with spaces ([tt]Space()[/tt]).[/li]
[li]Change the font on your ListBox to a non-proportional font (like Courier).[/li][/ol]

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
To CautionMP
Thanks,
Think I can make that work.
 
I echo EarthandFire. I have used that code and it is very robust.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top