Solved Simple Query to divide two fields (1 Viewer)

Snowflake68

Registered User.
Local time
Today, 11:24
Joined
May 28, 2014
Messages
452
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, 04:24
Joined
Oct 29, 2018
Messages
21,357
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, 11:24
Joined
May 28, 2014
Messages
452
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, 11:24
Joined
May 23, 2011
Messages
4,717
Perhaps something like:

FormatNumber(1/70,4)
 

isladogs

MVP / VIP
Local time
Today, 11:24
Joined
Jan 14, 2017
Messages
18,186
@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