By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,441 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

List box decimal places

P: n/a
Hello,
I am displaying numerical (single) values from a table into a
list box using Access 2000. Although the format in the table is for
three decimal places, the list box rounds all the columns to two
decimal places. I do not know how to format the numbers in the list
box as the Format parameter has more to do with spacing.
Thanks,
Hank Reed

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 15 Dec 2004 03:18:50 -0800, "Hank" <ha********@aol.com> wrote:
Hello,
I am displaying numerical (single) values from a table into a
list box using Access 2000. Although the format in the table is for
three decimal places, the list box rounds all the columns to two
decimal places. I do not know how to format the numbers in the list
box as the Format parameter has more to do with spacing.
Thanks,
Hank Reed

Hi
Yes, how odd!
You will have to put an explicit format function in the rowsource of
the list box, eg
SELECT DISTINCTROW format([Table1].[test], "#.000") FROM [Table1];
David

Nov 13 '05 #2

P: n/a
David Schofield wrote:
On 15 Dec 2004 03:18:50 -0800, "Hank" <ha********@aol.com> wrote:

Hi
Yes, how odd!
You will have to put an explicit format function in the rowsource of
the list box, eg
SELECT DISTINCTROW format([Table1].[test], "#.000") FROM [Table1];
David


Hi David,
Thanks for the tip. I had actually tried the format approach myself
and could not make it work. In fact when I put it into the SQL
statement, the whole line turned red - meaning, of course, bad syntax.
Then I realized I had quotes inside of quotes. I always build a string
first so I can view the completed statement, during debug, before
assigning the rowsource, et cetera. This is the proper form if you are
building an SQL string:

strSQL1 = "SELECT Format([Table1].[test], '#.000') FROM [Table1];"
Me.ParameterList.RowSource = strSQL1
Note the single quotes in the Format spec.
Thanks again,
Hank Reed

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.