Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query conversion problem from access 2 to 2000 using rate function. 1

Status
Not open for further replies.

mtoyen

Programmer
Feb 9, 2000
1
US
I have a column, in a query, that uses the RATE function. In Access 2000, for certain rows, it is returning #ERROR. In Access 2, using the same data, it returns an interest rate of 0 ( which is correct). I am guessing that the function is not converging in 2000. Does anyone know if they have changed the function they use to compute RATE?<br>
<br>
(As a work-around ) Is there anyway to test for #ERROR and return 0 if it occures? I have tried iserror and isnumeric neither worked.<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>

 
Well its in Access '97<br>
goto Help and type in RATE in 2000<br>
If it is there then you have a syntax problem or you are passing an invalid parameter i.e. the field in AC 2000 is an integer and it needs to be double??? (or something)<br>
<br>
here it is in'97<br>
<br>
Syntax<br>
<br>
Rate(nper, pmt, pv[, fv[, type[, guess]]])<br>
<br>
Also you can make your own function called rate if it is not in 2000<br>
like so<br>
I called it ARATE because I or course have the RATE function in '97 and you can't have 2 with the same name.<br>
------------------------------------------------------------<br>
Public Function arate(nper1, pmt1, pv1, fv1, type1, guess)<br>
'do your calculations in here<br>
<br>
' set the final result back to the function<br>
arate = somevalue ' <br>
<br>
End Function<br>
----------------------------------------------------------<br>
to make your own function click on the &quot;Modules&quot; tab and cut and paste the whole thing between the lines in the white space.<br>
<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top