Solved Simple Query to divide two fields (1 Viewer)

Snowflake68

Registered User.
Local time
Today, 23:19
Joined
May 28, 2014
Messages
423
can anyone explain why a calculation in an Access query gives a different result to the same calculation in Excel.

For example 1/70 = 0.0143 in Excel (this is the correct answer)

but when I do the same in an Access query I get the result of 1.42857142857143E-02

How do I write the calculation to give the correct result in Access?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:19
Joined
Oct 29, 2018
Messages
14,041
Hi. Does it have something to do with rounding off the result? If so, maybe you could try using Round() or Fix() or maybe Format the result? Just a thought...
 

Snowflake68

Registered User.
Local time
Today, 23:19
Joined
May 28, 2014
Messages
423
Hi. Does it have something to do with rounding off the result? If so, maybe you could try using Round() or Fix() or maybe Format the result? Just a thought...
perfect thank you. I have changed it to round to 4 decimal places.
 

bob fitz

AWF VIP
Local time
Today, 23:19
Joined
May 23, 2011
Messages
4,174
Perhaps something like:

FormatNumber(1/70,4)
 

isladogs

CID VIP
Local time
Today, 23:19
Joined
Jan 14, 2017
Messages
14,404
@Snowflake68
Did you realise that the calculated value with the E-02 exponent was actually the same as 0.01428...and is in fact correct.
You've just rounded it as 0.0143
 

Users who are viewing this thread

Top Bottom