View Full Version : decimal number


Andrej
10-22-2007, 03:23 AM
Hello
my problem is how to reduce decimal number of column in the tables. Problem is that some numbers are quotients and they have a lot of decimal which make a problem in the report where they have to have just 2 decimals.
Column in the query and in the report is not reserved only for numbers.
if some one have idea?

RuralGuy
10-22-2007, 07:16 AM
You can use the Format() and Round() functions to display these numbers any way you choose.

Andrej
10-22-2007, 09:20 AM
that seems good solution, how do I use this function?

RuralGuy
10-22-2007, 09:28 AM
Have you looked up the functions in VBA help yet? Help shows you the syntax to use the functions. You can use them in the ControlSource of your controls on the reports.
=Round([YourField],2)
...as an example.

Andrej
10-22-2007, 09:44 AM
thanks for quick answer, and is it possible to do it in the table?

RuralGuy
10-22-2007, 10:06 AM
Number fields have Format and Decimal Places properties if you need them but I prefer to leave those properties alone and set them when I display the value in either a form or a report. Just my $0.02.

RuralGuy
10-22-2007, 10:08 AM
It is also possible to constrain and format the output of a field in a query and use the query as the input to a report rather than a table.