Solved

Display number with 4 decimals on a form

Posted on 2014-11-26
8
127 Views
Last Modified: 2014-11-26
I'm trying to make a number display with 4 decimals in a combobox field on a form.

If for example the number is 0.0445 I want it to display as .0445

Another example... if the number is 0.049 I want it to display as .0490

How can I do this?
0
Comment
Question by:SteveL13
[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
  • 3
  • 3
  • 2
8 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40466809
Select the Combobox.

Go to the Property Sheet (if it is not visible, press F4).

Go to the Format tab.

Change Format to (say) "Standard". Don't change it to "General Number" - see http://msdn.microsoft.com/en-us/library/office/ff194621(v=office.15).aspx - the next step will be ineffective if you do that.

Change Decimal Places from whatever it is (presumably "Auto") to 4.
0
 

Author Comment

by:SteveL13
ID: 40466838
That did not work.  They still display as 0.0445  and 0.049 .  Also I am sorry I forgot to mention, I want the 0 before the decimal to NOT display.
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 40466884
Set the Format property to: .####

/gustav
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:SteveL13
ID: 40466921
This is crazy.  I can get the query to display the way I want.  But the form combobox will not cooperate.  Now shows as .0445  and .049   (the zeroes have been dropped but still not 4 decimals)
0
 
LVL 51

Accepted Solution

by:
Gustav Brock earned 250 total points
ID: 40466934
Forgot the combox, sorry. That displays text only which you can't format.
You will have to adjust the query you use as source for the combobox:

Select Field1, Field2, Format([YourDecimalField], ".####") From tblYourTable

Then, here, display the last column.

/gustav
0
 
LVL 24

Assisted Solution

by:Phillip Burton
Phillip Burton earned 250 total points
ID: 40466979
Instead of .####, use .0000
0
 

Author Closing Comment

by:SteveL13
ID: 40467241
Both worked.  Thanks.
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 40467508
You are welcome!

/gustav
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

628 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