Formating the content of one column in a list box from a "QUERY"

M

Momotam

I am trying to Right Justify the content of a column in a list box. The
output is being done by a query. In the query Field properties, i have
changed the format of the field to #,###.#
This works but cannot get the display to right justify the numbers in that
column. The numbers are shown on the left of the column.
That reply below was send to me but i canot understand how to do it
<<<"To format the values, base the combo box on a query that uses the Format
function on the field (not the Format property for the field) ">>>>
What is the Format function for a RIGHT or LEFT Justification ?
Thanks for helping
 
K

Klatuu

TheFormat function will return a string value which will left justify. There
is no left or right justification for the format function, nor is there any
for a list box column.
What you can do, is determine the width you want all the numbers to align to
and use something like this to align the number to the right:
format(30,space(10 - len(format(30#,###.#"))) & #,###.#")

The 10 in space(10 - will make all the values a total of 10 characters wide
with leading spaces.
 
M

Momotam

Thank you for the info, where do i put it.
In the field properties of the column i want to change ??. As soon as I do
this it put the format(30,space(10 - len(format(30#,###.#"))) & #,###.#") in
quotes and display it in the column.
rgds
 

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