Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Display number with 4 decimals on a form

Posted on 2014-11-26
8
Medium Priority
?
129 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

715 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