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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with decimal places in a list box. 1

Status
Not open for further replies.

PantoKing

Technical User
Nov 28, 2001
169
0
0
GB
Hello,

I'm stuck with a problem with a list box. I have a number which is stored with 4 decimal places, however in the list box it only shows 2. I've tried updating the field properties in the Row Source sql and that doesn't change it. Has anyone got any ideas?

Any help much appreciated.

Cheers,

Steve.

Make things as simple as possible — but no simpler. [pc3]
 
You may consider playing with the Format function in the RowSource's SQL.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I'd tried that playing with that,but no luck, it show's as four decimals in the query view. But not the form view.



Make things as simple as possible — but no simpler. [pc3]
 
And with the CDec function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Tried that, still no luck.

Make things as simple as possible — but no simpler. [pc3]
 
I just created a table with a field having decimals. I choose "Number", "Double" and set the Decimals length to 4... I entered data with anywhere from 2 to 4 decimal places, then used this in a Listbox. It showed the 2 to 4 decimal places until I changed the underlying query to use this format command

Format([Rate],"#.0000")

and the Listbox displayed correctly.

PaulF
 
Excellent, that worked great. Thanks Paul.

Make things as simple as possible — but no simpler. [pc3]
 
Just to know PantoKing, what's new in PaulF's reply vs my 1st reply ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top