How to Replace 0% with n/a ???

C

Cheese

Thanks for the tip. I forgot about doing it this way.

However, after I enter that into the control source and press the "Preview
Invoice" button, Access crashes with the " Access encountered a problem and
needs to close" error, wanting to send Microsoft an error report.

Any idea what might be causing this? I am using Access 2002.


Ofer Cohen said:
In the field control source you can write

=IIf([FieldName]=0,"NA",[FieldName])

--
Good Luck
BS"D


Cheese said:
I'm using the standard orders template found in Access for my business.

When I take retail orders that do *not* receive a discount, it shows 0% in
the discount column - as shown in the picture I've provided below.

<a
href="http://img457.imageshack.us/img457/2963/untitledmv3.gif">http://img457.imageshack.us/img457/2963/untitledmv3.gif</a>

I think customers get a little disappointed to see that 0% there, so can I
change this to read n/a instead of 0%?
 
J

John Vinson

Cheese said:
I'm using the standard orders template found in Access for my business.

When I take retail orders that do *not* receive a discount, it shows 0% in
the discount column - as shown in the picture I've provided below.
I think customers get a little disappointed to see that 0% there, so can I
change this to read n/a instead of 0%?

It's a bit obscure, but you can use the "four level format" property of the
textbox. Set the
Format property to a string with four different formats - positive numbers,
negative numbers,
zero and Null values will use the first, second, third and fourth formats.
E.g.

"Percent"; "Data Error"; "n/a"; "Undefined"

will use the Percent format for numbers greater than zero, and literal text
strings as shown
for negative, zero or null values. Adapt as you see fit.
 
O

Ofer Cohen

The IIf statement shouldn't make that happen, there might be no connection to
the changes you made.

First back up your mdb, just in case

What did you write in the control source of the field?

--
Good Luck
BS"D


Cheese said:
Thanks for the tip. I forgot about doing it this way.

However, after I enter that into the control source and press the "Preview
Invoice" button, Access crashes with the " Access encountered a problem and
needs to close" error, wanting to send Microsoft an error report.

Any idea what might be causing this? I am using Access 2002.


Ofer Cohen said:
In the field control source you can write

=IIf([FieldName]=0,"NA",[FieldName])

--
Good Luck
BS"D


Cheese said:
I'm using the standard orders template found in Access for my business.

When I take retail orders that do *not* receive a discount, it shows 0% in
the discount column - as shown in the picture I've provided below.

<a
href="http://img457.imageshack.us/img457/2963/untitledmv3.gif">http://img457.imageshack.us/img457/2963/untitledmv3.gif</a>

I think customers get a little disappointed to see that 0% there, so can I
change this to read n/a instead of 0%?
 

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