473,569 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Nov 13 '05 #1
2 6695
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
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.ParameterLis t.RowSource = strSQL1
Note the single quotes in the Format spec.
Thanks again,
Hank Reed

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
6117
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number. "Decimal Number" sometimes serves to distinguish Base 10 numbers, eg "15", from Base 2 numbers, Eg "1111". At other times "Decimal Number" serves to...
3
7068
by: Brent Bortnick | last post by:
Does anyone know how to find out the number of decimal places a number has. I need this info so that i can round to 3 decimal places if the number has 3 decimal places or to 2 decimal places if the number has 2 decimal places. Any help would be great. Regards, Brent
2
3585
by: Carl G | last post by:
I am storing a 0.000 a System.Decimal in a DataRow. On retrieval the value is only 0 without the three decimal places. It looks like the Get property returns System.Decimal.Zero, but why???? I can't figure out why the design is so that the DataRow "alters" the value entered. In my application a decimal column in a row of a specific table...
4
9719
by: italia | last post by:
I changed the Fieldsize Property from text to Long Integer and Decimal Places = 6. I had decimals in the original field. But after the transfer, the digits after the decimals are gone. Now even after I have change the Fieldsize propert to Decimal with Scale = 2, the digits after the decimal are not seen. For eg. If the text was 16.27....
8
11320
by: nick | last post by:
printf("%lf",3.25); the result is 3.25000 i want the answer correct to 3 decimal places What should i do? thanks!
3
12410
by: mohaaron | last post by:
Hello All, Does anyone know of a way to test a decimal for the number of places it has before and after the decimal? I need to do something like this. decimal value1 = 172.45; // If value1 has more then two places before the decimal return zero. // Or if value1 has more then two places after the decimal return zero.
19
3583
by: VK | last post by:
http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/ b495b4898808fde0> is more than one month old - this may pose problem for posting over some news servers. This is why I'm starting a new one] I'd still like to finish this rounding mess. As a startup lemma we can take that VK is the worst programmer of all times and...
2
6978
by: hunslair | last post by:
This is a really basic question. I am taking a teach yourself beginners course on Access 2003 and have run into a road block on one practice. In a select query, I have created a simple calculation field. Markup:(-)/ which is to formatted as Percent with 0 Decimal places. When I click into the Format box is am offered
3
1983
by: David | last post by:
Any ideas why this statement: mBalanceChange = Double.Parse(strCurrentBalance, Globalization.NumberStyles.AllowThousands Or Globalization.NumberStyles.AllowDecimalPoint) - mBalanceDouble would leave me with a double containing over 10 decimal places when strCurrentBalance was a string containing a double with two decimal places and...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.