Big decimal number

A

an

Hello!

I have a Report, based in query with formulae in design
form Field row:
Ar: DSum("Ar";"T_Patrim";"Aval Like Yes")
and
Total row:
Expression

Result numbers with 12345,12345678910 decimal digits.

In Report, on Textbox Format: Standard and Decimal
Plates=2, but the numbers are 12345,12345678910 decimal
digits too.

How is possible to format query to 2 or 3 digits only, to
obtain it in Textbox, or Textbox in Report, please?

Thanks in advance.
an
 
F

Fons Ponsioen

While in the query design mode, right click on the field
that you wish to format. Click on properties, and in the
format field of the properties window specify for instance
###.### this would allow up to 3 decimals t be displayed.
Hope this helps.
Fons
 
A

an

Thanks for your reply.
But, when I write ###.###, in Format field change it to
#.### and don't modify situation. (?)
an
 
S

SA

An:

Its not working because for some reason the result of DSum is returning as a
string or text value and not a number. Try wrapping your formula in a
conversion function as in:

Ar: CSng(Nz(DSum("Ar";"T_Patrim";"Aval Like Yes"),0))

The intermediate NZ function makes sure that if DSum returns a null it is
converted to zero before forcing it into a number value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top