Solved

Display number with 4 decimals on a form

Posted on 2014-11-26
8
120 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 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