Connecting Tech Pros Worldwide Help | Site Map

List box decimal places

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 05:22 AM
Hank
Guest
 
Posts: n/a
Default List box decimal places

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


  #2  
Old November 13th, 2005, 05:24 AM
David Schofield
Guest
 
Posts: n/a
Default Re: List box decimal places

On 15 Dec 2004 03:18:50 -0800, "Hank" <hankrunner@aol.com> wrote:
[color=blue]
>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
>[/color]
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

  #3  
Old November 13th, 2005, 05:24 AM
Hank
Guest
 
Posts: n/a
Default Re: List box decimal places

David Schofield wrote:[color=blue]
> On 15 Dec 2004 03:18:50 -0800, "Hank" <hankrunner@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[/color]

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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.