Bringing back a %

C

CLE001

In an Access (2002 SP3) query, I've set the properties format to Percent.
I've written the formula: Field 1 / Field 2. When Field 2 is 0, I get the
#ERROR message.

So, I do the Iif statement when Field 2 = 0, "", Field 1 / Field 2. The
#ERROR message is gone, but the percentages are too - the return is 15-20
decimal numbers.

This should be a simple function - what am I missing?
 
G

guido via AccessMonster.com

Access is ignoring your format because you are setting some of the fields to
text (empty string ""). Change formula to: IIF(Field 2 = 0, Null, Field 1 /
Field 2)
 
G

Gavelle

Thank you, Thank you! This was exactly what my problem was & when i changed
"" to Null, it worked fine. These discussion groups are the BEST!!!
 
Top