number to appear as currency in list box

M

magicdds-

I have a form with a list box. One of the columns in the list box is a number
that has a format of Currency in the underlying query. In the list box
however, it comes up as just a number. Is there a way to get it to appear as
currency?

Thanks.
Mark
 
J

John W. Vinson

I have a form with a list box. One of the columns in the list box is a number
that has a format of Currency in the underlying query. In the list box
however, it comes up as just a number. Is there a way to get it to appear as
currency?

Thanks.
Mark

Base the listbox on a Query using the Format() function to cast the value as a
text string formatted appropriately. The visible column should not be the
bound column if you're using it to select a Currency value for use elsewhere.

For example for a field named MyMoney use a query like

SELECT MyMoney, Format(MyMoney, "Currency"), SomeOtherFields
FROM mytable
ORDER BY <some appropriate field>

Set the ColumnWidth property so that the first column is of zero width and
what you see will be the $32.80 text rather than the 32.8 value.
 
M

magicdds-

That did the trick!
Thanks for your help.
Mark


John W. Vinson said:
Base the listbox on a Query using the Format() function to cast the value as a
text string formatted appropriately. The visible column should not be the
bound column if you're using it to select a Currency value for use elsewhere.

For example for a field named MyMoney use a query like

SELECT MyMoney, Format(MyMoney, "Currency"), SomeOtherFields
FROM mytable
ORDER BY <some appropriate field>

Set the ColumnWidth property so that the first column is of zero width and
what you see will be the $32.80 text rather than the 32.8 value.
 

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