Solved

ComboBox List Decimal Places

Posted on 2011-02-16
7
506 Views
Last Modified: 2013-11-28
I have a combobox on a form that is populated by running a query of a table.  I would like the decimal formatting for all to be 3 decimal places.  The issue is, when I select the drop down list from cmbHXRShellOD on the form, the decimal places are rounded up to 2 decimal places.  The formatting for the combobox, table column, and query is 3 decimal places.  For example, I have a shell OD of 8.625.  When this is populated into the combobox dropdown, it is listed as 8.63.  Then when selected from dropdown, the combobox value is 8.630.  How do I get the dropdown list to show 8.625?

Variables:
form: Heat Exchanger
combobox: cmbHXRShellOD
table: tblSSPipeSizes
query: queHXRShellOD

Formatting:
cmbHXRShellOD: Format-Fixed, Decimal Places-3, Column Count-1, Column Widths-1"
0
Comment
Question by:aftamath77
7 Comments
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 34908478
In your query, retriev ShellOD as a formatted string:

ShellOD3: Format([ShellOD], "0.000")

Then use ShellOD3 in your listbox.

/gustav
0
 

Author Comment

by:aftamath77
ID: 34908664
The datasheet view of the query shows the numbers correctly formatted to 3 decimal places, ie. 8.625.  This is where the combobox is getting its list values.  But when the combobox retrieves these list values from the query, the dropdown list now shows rounded to 2 decimal places, ie 8.63.
0
 
LVL 70

Expert Comment

by:KCTS
ID: 34908756
right click on the combo box and set the format properies to FIXED, 3 decimal places
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:aftamath77
ID: 34909285
There is nothing in the menu when I right click on the combobox when looking at the form in design view.  I'm using Access 2007 if that matters.  However, in the properties panel for the combobox, the Format is fixed and Decimal places set to 3, as stated in the original paste.
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 34910542
> the dropdown list now shows rounded to 2 decimal places, ie 8.63.

Numeric values are converted to strings using the "fixed" format of typical two decimals and correct 4/5 rounding. Bypass this by using Format in your query as shown.

/gustav
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 35340065
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now