Power function in an access query

How can I change the following query in order to give the user the
precision choice rather than hard coded to 10 decimal places?

SELECT tblAmortiserSchedule.Identifier,
Sum(tblAmortiserSchedule.Percentage) AS SumOfPercentage
FROM tblAmortiserSchedule
GROUP BY tblAmortiserSchedule.Identifier
HAVING
(((Sum(tblAmortiserSchedule.Percentage))>100.000000000000000 01));
colmkav [ Di, 08 April 2008 12:24 ] [ ID #1937987 ]

Re: Power function in an access query

On Tue, 8 Apr 2008 03:24:55 -0700 (PDT), colmkav
<colmjkav [at] yahoo.co.uk> wrote:

I don't see anything here that is hardcoded to 10 decimals so I'm not
sure what you mean. I do see the last number as very fishy.

If you want to round to N digits, you first find a rounding function
that can do that (this newsgroup has posted them in the past), then
you ask the user for N, perhaps via a form.
select MyRoundFunction(MyField)
from etc.

MyRoundFunction would take the value and round it to N digits.

-Tom.



>How can I change the following query in order to give the user the
>precision choice rather than hard coded to 10 decimal places?
>
>SELECT tblAmortiserSchedule.Identifier,
>Sum(tblAmortiserSchedule.Percentage) AS SumOfPercentage
>FROM tblAmortiserSchedule
>GROUP BY tblAmortiserSchedule.Identifier
>HAVING
>(((Sum(tblAmortiserSchedule.Percentage))>100.00000000000000 001));
Tom van Stiphout [ Di, 08 April 2008 15:49 ] [ ID #1937998 ]
Datenbanken » comp.databases.ms-access » Power function in an access query

Vorheriges Thema: Access 2000 mde on Access 2007 runtime?
Nächstes Thema: Using Functions from other Databases