Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

Display number with 4 decimals on a form

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
SteveL13
Asked:
SteveL13
  • 3
  • 3
  • 2
2 Solutions
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
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
 
SteveL13Author Commented:
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
 
Gustav BrockCIOCommented:
Set the Format property to: .####

/gustav
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
SteveL13Author Commented:
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
 
Gustav BrockCIOCommented:
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
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
Instead of .####, use .0000
0
 
SteveL13Author Commented:
Both worked.  Thanks.
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now