Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2006

Tip: Looking for answers? Try searching our database.

Limiting a Ccur() function to 2 decimal places

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
graeme34 - 29 Mar 2006 20:09 GMT
Hello people, is there any way to cause the Ccur() function to round to two
decimal places??

As I have a query that has the InvoiceTotal expression,
InvoiceTotal: CCur([TotalNett]*([VatValue]/100+1))
When I view the expression in datasheet view it is formatted to two decimal
places, yet when I click into the cell the value expands to an extra decimal
place; therein lies the problem.
I am using this value in a recordset, I have a Do Until Loop...that counts
this field in the recordset then compares it with a value from a textbox
control containg the customer payment amount. The count in the loop counts
all records that have the invoice paid check box ticked. And if the textbox
control value is not equal to the count value of the recordset field value
the user is prompted with a message informing them that the amounts are
different.
When debugging the code I noticed the rs!InvoiceTotal was having the exact
value, i.e the extra decimal place.....is there anything I can add to the
Ccur() to limit it to two decimal places??
graeme34 - 29 Mar 2006 20:19 GMT
Sorry!! have just realised I have posted this question in the wrong section!
I meant to post it in the Modules/DAO/VBA section...not to worry I sure one
of you wise people will know the answer :)
>Hello people, is there any way to cause the Ccur() function to round to two
>decimal places??
[quoted text clipped - 14 lines]
>value, i.e the extra decimal place.....is there anything I can add to the
>Ccur() to limit it to two decimal places??
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.