-----Original Message-----
Hi Sandy,
My name is Dennis Schmidt. Thank you for using the Microsoft Newsgroups.
The Roundup and Rounddown functions are actually Excel functions. They
cannot be used directly from Access, but can be called from within an
Access function.
Function myCalc(mynum As Double, mynum1 As Double)
Dim obj As Excel.Application
Dim i As Double
Set obj = CreateObject("Excel.Application")
i = obj.Application.RoundUp(mynum, mynum1)
myCalc = i
obj.Quit
Set obj = Nothing
End Function
* Make sure database has a reference to Excel Object Library
* When calling function from query, use the following syntax in a new
column in query:
Expr1: mycalc([num2],0)
Also see these Knowledge Base articles:
Q209996 ACC2000: How to Round a Number Up or Down by a Desired Increment
http://support.microsoft.com/default.aspx?scid=kb;EN- US;Q209996
Q210564 ACC2000: Round or Truncate Currency Values to Intended Number
http://support.microsoft.com/default.aspx?scid=kb;EN- US;Q210564
Alternatively, you can use automation to call the Excel function from
Access. This
is demonstrated in the following Knowledge Base article:
Q198571 ACC2000: How to Call Excel Functions from Within Access
US;Q198571
I hope this helps! If you have additional questions on this topic, please
reply to this posting.
Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
Regards,
Dennis Schmidt
Microsoft Support
.