?
Solved

ComboBox List Decimal Places

Posted on 2011-02-16
7
Medium Priority
?
590 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 51

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
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.

 

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 51

Accepted Solution

by:
Gustav Brock earned 2000 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 93

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
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: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

752 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