Does Access use Round() to display different levels of precision?

Margarita

Registered User.
Local time
Today, 08:14
Joined
Aug 12, 2011
Messages
185
Hello,
I have some currency fields in a table and I set their decimal places to 2 so only 2 are displayed. But some have more digits so that the actual value in the cell can be slightly different than what is displayed. I want to replace the value in the cells so that the ACTUAL value is the one that is displayed while the decimal places property is set to 2 (that is, the value I see right now without clicking into the cell).
So would I replace using

PHP:
set [field1]= round([field1], 2)

or does Access use a different rounding function for displaying numbers up to a certain number of decimal places?
Thank you.
 
I use a query as my data souce and changed the default for currency which is 2 decimal palces to 3 places by the following :

feeslegal: FormatCurrency(Round([legalfees]),3) so i am assuminhg if you replaced my 3 with a 2 it will round to 2 places .Just a thought .

Regards

after note ROUNDING CAN BE UP OR DOWN
 
The Round() function should work for you. Beware that Access uses bankers rounding:

?round(1.5,0)
2
?round(2.5,0)
2
 
If you simply want to update every record in your table you could use the following;
Code:
Dim strSQL As String

strSQL  = "UPDATE YourTableName SET YourTableName.[YourFieldName] = Round([YourFieldName],2);"

DoCmd.RunSQL strSQL
 
Hello, the update statement was what I was going to use. I just wanted to first make sure that using round will leave me with the values that the user currently sees displayed- because this is the actual value that we want stored.
You have all reasurred me. I am going to go ahead and update the table.
Thank you!
 

Users who are viewing this thread

Back
Top Bottom