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  

List Boxes



 
 
Thread Tools Display Modes
  #1  
Old May 31st, 2004, 05:07 PM
Turner
external usenet poster
 
Posts: n/a
Default List Boxes

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!

Note: An early answer suggested that I modify the format
field of an Unbound Control with =Format([FieldName],"$
#,###."). But, unless I am really missing something LIST
BOXES don't have control fields.



  #2  
Old May 31st, 2004, 10:04 PM
Damon Heron
external usenet poster
 
Posts: n/a
Default List Boxes

Make the row source of the listbox your query, and have the query read
something like this:

SELECT Currency.CrrID, CCur(Format(Currency.Currency,"$#,###.")) AS
myWholeNum
FROM [Currency];

replacing your table fieldnames as needed. This rounds up your dollar
amounts, however, and still shows $141.00 (two trailing zeroes), so this may
not be exactly what you want...

HTH
Damon


"Turner" wrote in 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!

Note: An early answer suggested that I modify the format
field of an Unbound Control with =Format([FieldName],"$
#,###."). But, unless I am really missing something LIST
BOXES don't have control fields.





 




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 01:36 PM.


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