How can I have a computed field that displays the product of an integer field in the footer?

  • Thread starter Thread starter Savvoulidis Iordanis
  • Start date Start date
S

Savvoulidis Iordanis

Just as we use sum([price]), I'd like something like : Product([field1])

TIA
 
Hi,



SELECT EXP(SUM(LOG( field1) ) )
FROM mytable
WHERE field1 >0




Hoping it may help,
Vanderghast, Access MVP
 
I could create a function in a module:

Function Product ( aID as Long ) as String
...
End Function

but, if you put this in queries or continuous forms , it will slow it down a
lot.

Mauricio Silva
 
Excuse me, again please... but how did this came up to you?
I think I'll reopen my maths books...
 
HI,


The idea is that we can multiply by adding the log of the numbers, and
at the end, take the anti-log to get back the result:

a * b = exp( log(a) + log(b) )


a ^ n = exp( log(a) * n )



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top