Solved

Display number with 4 decimals on a form

Posted on 2014-11-26
8
114 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
  • 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 49

Expert Comment

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

/gustav
0
 

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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 49

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 49

Expert Comment

by:Gustav Brock
ID: 40467508
You are welcome!

/gustav
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

762 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

20 Experts available now in Live!

Get 1:1 Help Now