Format problem

  • Thread starter Thread starter Ruth Isaacs
  • Start date Start date
R

Ruth Isaacs

Hello All

I want a textbox on my form to display the value of 'prop' (which is a
number field) ONLY if the value is <>1, and I want it to display in brackets
and formatted as a percent with no decimal places. The nearest I ca get is
to set the data source as
=IIf([prop]<>1,"(" & Format([prop],"Percent") & ")")
but this puts 2 decimal places on the value. Is it possible to avoid that?

Hope someone can help

Many thanks
Leslie Isaacs
 
Try


=IIf([prop]<>1,"(" & Format([prop],"0%") & ")")

And actually I think the following will also work.

=IIf([prop]<>1,Format([prop],"(0%)"))
 
John
Many thanks for that - worked a treat!
Les

John Spencer said:
Try


=IIf([prop]<>1,"(" & Format([prop],"0%") & ")")

And actually I think the following will also work.

=IIf([prop]<>1,Format([prop],"(0%)"))

Ruth said:
Hello All

I want a textbox on my form to display the value of 'prop' (which is a
number field) ONLY if the value is <>1, and I want it to display in brackets
and formatted as a percent with no decimal places. The nearest I ca get is
to set the data source as
=IIf([prop]<>1,"(" & Format([prop],"Percent") & ")")
but this puts 2 decimal places on the value. Is it possible to avoid that?

Hope someone can help

Many thanks
Leslie Isaacs
 

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

Back
Top