Format according to Iif statement

adamlaing

Registered User.
Local time
Today, 13:21
Joined
Jan 27, 2005
Messages
35
I have the following field value for a query:

UKper: IIf([Five Year Premium Analysis Geographic Export]![Geographic Total]>0,[Five Year Premium Analysis Geographic Export]!UK/[Five Year Premium Analysis Geographic Export]![Geographic Total],"^")

I want the calculated value to be displayed as a percentage when it appears and for the ^ to be stored as text. Any suggestions on how to do this? Currently instead of a percentage the values display as a long decimal and the ^ shows up as it should.
 
Pat, before I saw your post I tried the format function and could not get the syntax correct. What I ended up doing was using the FormatPercent function and it works the same:

UK_pecentage: IIf([Five Year Premium Analysis Geographic Export]!Geographic_total>0,FormatPercent(Nz([Five Year Premium Analysis Geographic Export]!UK,0)/Nz([Five Year Premium Analysis Geographic Export]!Geographic_total,0),0),"^")
 

Users who are viewing this thread

Back
Top Bottom