A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Decimal Places



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2004, 11:45 PM
Turner
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 01:26 AM
fredg
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 02:46 PM
Turner
external usenet poster
 
Posts: n/a
Default 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  
Old May 31st, 2004, 05:29 PM
fredg
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.