?
Solved

MS Access - Return a specific number of decimal places

Posted on 2015-01-19
2
Medium Priority
?
145 Views
Last Modified: 2015-01-19
I'm doing some match on two field and would like to return X decimal places.

Right now I'm getting values like  

.71 / 481,534.86   = 1.4744519223385E-06

What I want to return is .0000015

Ideas?
0
Comment
Question by:keschuster
2 Comments
 
LVL 54

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 40557773
Hi,

do you mean

Expr1: Round(0.71/481534.86;7)

Regards
0
 
LVL 34

Expert Comment

by:Mike Eghtebas
ID: 40557787
Dim numVal As Double
numVal  = .71 / 481,534.86
MsgBox Format(numVal ,"0.0000000")  ' for 0.0000015
'MsgBox Format(numVal ,"#.0000000")  ' for .0000015
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

864 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