changing decimal places

K

Kate

I have a subform that performs a calculation as shown:
=IIf(IsNull(Sum([QtyIssued])),0,Sum([QtyIssued]))

The field size of 'QtyIssued' is single, and decimal places is set to
auto.

When I perform the above calculation, if entries in QtyIssued are say
1, 2, and 3, then the calculation will return '6', which is good. But
if the entries in QtyIssued are say 1.2, 4, and 2.1, then the
calculation will return '7.30000000' for example, when I just want it
to display 2 decimal places. If I change the format in the calculation
text box to 'standard' for example, and set the decimal places to 2,
then my first example above would show 6.00 which is not what i want.

Can anyone help with this?
 
R

Rick Brandt

Kate said:
I have a subform that performs a calculation as shown:
=IIf(IsNull(Sum([QtyIssued])),0,Sum([QtyIssued]))

The field size of 'QtyIssued' is single, and decimal places is set to
auto.

When I perform the above calculation, if entries in QtyIssued are say
1, 2, and 3, then the calculation will return '6', which is good. But
if the entries in QtyIssued are say 1.2, 4, and 2.1, then the
calculation will return '7.30000000' for example, when I just want it
to display 2 decimal places. If I change the format in the
calculation text box to 'standard' for example, and set the decimal
places to 2, then my first example above would show 6.00 which is not
what i want.

Can anyone help with this?

I don't think there is a format that will show decimals only when non-zero and
also a fixed number of places.
 

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