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 box display format



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2008, 05:30 AM posted to microsoft.public.access.forms
3Nails
external usenet poster
 
Posts: 10
Default list box display format

I have the following code: SELECT [TBL Pricing Data Initial
Delivery].ID_Desc, [TBL Pricing Data Initial Delivery].ID_Rate FROM [TBL
Pricing Data Initial Delivery] ORDER BY [TBL Pricing Data Initial
Delivery].ID_Desc;

The ID_Rate original source is standard with 2 dec. For a value of 4,321.50,
the list box will only display 4321.5 . How can I get it to display the
comma and the trailing zero? Thanks......
  #2  
Old June 11th, 2008, 07:13 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default list box display format

On Tue, 10 Jun 2008 21:30:00 -0700, 3Nails
wrote:

The ID_Rate original source is standard with 2 dec. For a value of 4,321.50,
the list box will only display 4321.5 . How can I get it to display the
comma and the trailing zero? Thanks......


Use an explicit Format() function call:

SELECT [TBL Pricing Data Initial Delivery].ID_Desc,
Format([TBL Pricing Data Initial Delivery].ID_Rate, "#,##0.00")
FROM [TBL Pricing Data Initial Delivery]
ORDER BY [TBL Pricing Data Initial
Delivery].ID_Desc;
--

John W. Vinson [MVP]
 




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 11:35 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.