Log10 function

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

In Access 2000 there was a Log10 function, this seems to
have disapeared in the 2002 version. The Log function in
2002 returns the Natural Log. Does anyone know how to do
a Log10 in 2002?

Thanks,
Andy
 
HI Andy,
You can get the log10 of a number like this:

Ln(somenumber)/ln(10)

In general:

x = number
y = base you want to use

Logy(x) = ln(x)/ln(y)

Well, I just looked in Help and found this:
You can calculate base-n logarithms for any number x by dividing the natural logarithm of x by the natural logarithm of n as
follows:

Logn(x) = Log(x) / Log(n)

The following example illustrates a custom Function that calculates base-10 logarithms:

Static Function Log10(X)
Log10 = Log(X) / Log(10#)
End Function
HTHDan Artuso, MVP
 
Back
Top