roundup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My formular is to show total for monthly payment in access.

The formular :

Round([Principal+Interest]/([Period]*12),0)...([12400]/[3]*12),0) = 344

but when i enter "Roundup" instead of "Round" a message come out "
Undefined function 'ROUNDup' in expression.

Please help me. Thank you
 
Hi,
Round([Principal+Interest]/([Period]*12),0)...([12400]/[3]*12),0) = 344

but when i enter "Roundup" instead of "Round" a message come out "
Undefined function 'ROUNDup' in expression.

Does Access know a funtion like "RoundUp"? I Don't think so.

Try this:

1 .Create a new Module.
2. Paste this Code into it

Option Compare Database
Option Explicit

Public Function RoundUp(ByVal sngValue As Single) As Single
Dim sngDummy As Single

sngDummy! = Fix(sngValue!)
RoundUp = sngDummy - (sngDummy! <> sngValue!)
End Function

Now Access should Know this Function.

HTH.

Thomas.
 
It sounds like you will need to write your own custom RoundUp function, if
this is what you want to do. Here is an article that you might find helpful:

http://www.mvps.org/access/modules/mdl0054.htm


If my answer has helped you, please answer yes to the question that reads
"Did this post answer the question?" at the bottom of the message thread.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

My formular is to show total for monthly payment in access.

The formular :

Round([Principal+Interest]/([Period]*12),0)...([12400]/[3]*12),0) = 344

but when i enter "Roundup" instead of "Round" a message come out "
Undefined function 'ROUNDup' in expression.

Please help me. Thank you
 
I'd tried..but new message came out..'Wrong number of argument used with
function in query expression.


Thank you ....Thomas Winkler
 
Hi,
I'd tried..but new message came out..'Wrong number of argument used with
function in query expression.

this is correct. The Round-Function has 2 parameters, the number itself and
the number of decimals.
The new RoundUp-Function has only 1 parameter - the number.

You used the statement
Round([Principal+Interest]/([Period]*12),0)...([12400]/[3]*12),0) = 344

where after the "/[3]*12)" follows a comma and a zero. This is the 2nd
parameter for the Round-Function.

Remove comma and zero and it will work.

Thomas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top