Solved

ComboBox List Decimal Places

Posted on 2011-02-16
7
573 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 50

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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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 50

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 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