Decimal Places

  • Thread starter Thread starter Turner
  • Start date Start date
T

Turner

I have several currency type fields within a query. I
have set the "decimal places" property to zero. When I
execute the query it shows the amounts correctly (ie. $,
and no pennies.

When I use the same query as a row source for a list box
the pennies are diplayed.

How to I get rid of the pennies.

Thanks!
 
I have several currency type fields within a query. I
have set the "decimal places" property to zero. When I
execute the query it shows the amounts correctly (ie. $,
and no pennies.

When I use the same query as a row source for a list box
the pennies are diplayed.

How to I get rid of the pennies.

Thanks!

As the control source of an unbound control:
=Format([FieldName],"$ #,###.")

will show the amount with comma separated thousands, rounded up
without any decimals. I've add a space between the $ and the amount
because I like it that way. Remove the space if you don't want it
there.
 
Unless, I am totally missing something List Boxes don't
have Unbound Controls. So there's no Format property to
place the formating controls.

So, my question still stands.

-----Original Message-----
I have several currency type fields within a query. I
have set the "decimal places" property to zero. When I
execute the query it shows the amounts correctly (ie. $,
and no pennies.

When I use the same query as a row source for a list box
the pennies are diplayed.

How to I get rid of the pennies.

Thanks!

As the control source of an unbound control:
=Format([FieldName],"$ #,###.")

will show the amount with comma separated thousands, rounded up
without any decimals. I've add a space between the $ and the amount
because I like it that way. Remove the space if you don't want it
there.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Unless, I am totally missing something List Boxes don't
have Unbound Controls. So there's no Format property to
place the formating controls.

So, my question still stands.
-----Original Message-----
I have several currency type fields within a query. I
have set the "decimal places" property to zero. When I
execute the query it shows the amounts correctly (ie. $,
and no pennies.

When I use the same query as a row source for a list box
the pennies are diplayed.

How to I get rid of the pennies.

Thanks!

As the control source of an unbound control:
=Format([c

will show the amount with comma separated thousands, rounded up
without any decimals. I've add a space between the $ and the amount
because I like it that way. Remove the space if you don't want it
there.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

I missed that part about it being a List Box.
However the same expression works.
Place it in the query that is the Rowsource for the List Box.

NoDec:Format([FieldName],"$ #,###.")

Then use this [NoDec] column (not [FieldName]) and it will display in
the List Box without the decimals.
 
Back
Top