If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Decimal Places
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! |
#2
|
|||
|
|||
Decimal Places
On Sun, 30 May 2004 15:45:50 -0700, Turner wrote:
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. |
#3
|
|||
|
|||
Decimal Places
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----- On Sun, 30 May 2004 15:45:50 -0700, Turner wrote: 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. . |
#4
|
|||
|
|||
Decimal Places
On Mon, 31 May 2004 06:46:54 -0700, Turner wrote:
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----- On Sun, 30 May 2004 15:45:50 -0700, Turner wrote: 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. -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|