Full Version: Rounding A Number In A Control?
UtterAccess Forums > Microsoft® Access > Access Forms
scadaman29325
I've got a table with a number field that has 6 decimal places.
want the form control to show only 2 decimal places.
Otried setting the table's field to 2 decimal places but that did not work.
All help is greatly appreciated, Thanks, Phil
theDBguy
Hi,
Have you also tried to set the number of decimal places in the form's design view?
Just my 2 cents...
scadaman29325
Found it! It wasn't there the first time I looked!
Thanks dbguy, Phil
theDBguy
Hi Phil,
Glad we could help. Good luck with your project.
scadaman29325
Well [censored]!
That didn't work. Still shows a bunch of decimal places.
The field in the table already has records with 6 places, but I want it to show only 2 in the form's control.
Thanks again for any help, Phil
scadaman29325
Censored! It wasn't a bad word! Y'all are too sensitive!
theDBguy
Hi,
If you are just concerned about "displaying" the data and not worried about being able to "modify" it, then you could probably modify the query for the form's record source by using the Round() function.
Hope that helps...
scadaman29325
The data will not change but I'm using the table as the record source not qry.
theDBguy
Try using a query instead of the table. In the query, you can specify how many decimal places to show in the column by using the Round() function.
Just my 2 cents...
JonSmith
Shouldn't formatting the textbox to 0.00 work? are you sure thats what you did?
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.