Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list box to always show 3 decimal places 2

Status
Not open for further replies.

JaredTaylor74

Technical User
Jul 26, 2004
51
US
I have a list box pulling data from a table... the column i am having trouble with is called "StopPin" the data entered has this input mask: 9.000 the character to the left of the decimal is not required, but the 3 to the right are, even if only a 0 is entered. no problem there. and even when I open the table the data is displayed correctly, but the list box that the user is going to see, cuts off the ending 0's.
ie. 2.300 shows 2.3 and 2.030 shows 2.03
I need the list box to always display 3 characters to the left of the decimal. there will always be 3 characters entered into the table.

i have tried making this column a number as well as text. both do the same thing.

any ideas?

Thank you,
Jared
 
Hello Jared,

Try something like the following and Good Luck!

SELECT FORMAT([YourTableName].[YourFieldName],"0.000") FROM YourTableName ORDER BY [YourTableName].[YourFieldName];

Have a great day!

j2consulting@yahoo.com
 
cool, thanks guys... i knew it had to be something easy like that.

'preciate it.

Jared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top