Need Help with an IF statement

D

DevilDog1978

IFF([CSAandSELinventory]![CountOfSERIAL_NUMBER]=[CSAandSELinventory]![LOWLIMIT],"YELLOW")
IIF([CSAandSELinventory]![CountOfSERIAL_NUMBER]>[CSAandSELinventory]![LOWLIMIT],"GREEN"
IFF([CSAandSELinventory]![CountOfSERIAL_NUMBER]<[CSAandSELinventory]![LOWLIMIT],"RED")

I am trying to build a pie chart report on a form. I am using the above to
assign colors based on my inventory levels. I know this will not fill the pie
chart with color, but it gives me the information I want. Any help would be
appreciated.
 
D

DevilDog1978

I worked it down to this:

COLOR:
IIf([CountOfSERIAL_NUMBER]=[LOWLIMIT],"YELLOW",IIf([CountOfSERIAL_NUMBER]>[LOWLIMIT],"GREEN",IFF([CountOfSERIAL_NUMBER]<[LOWLIMIT],"RED")))

I received the error Undefined function IIF in expression
 
D

Douglas J. Steele

You SURE it's saying "Undefined function IIF"? Your code shows IIf in two
places, and IFF in one. The function is IIF, not IFF.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


DevilDog1978 said:
I worked it down to this:

COLOR:
IIf([CountOfSERIAL_NUMBER]=[LOWLIMIT],"YELLOW",IIf([CountOfSERIAL_NUMBER]>[LOWLIMIT],"GREEN",IFF([CountOfSERIAL_NUMBER]<[LOWLIMIT],"RED")))

I received the error Undefined function IIF in expression

DevilDog1978 said:
IFF([CSAandSELinventory]![CountOfSERIAL_NUMBER]=[CSAandSELinventory]![LOWLIMIT],"YELLOW")
IIF([CSAandSELinventory]![CountOfSERIAL_NUMBER]>[CSAandSELinventory]![LOWLIMIT],"GREEN")
IFF([CSAandSELinventory]![CountOfSERIAL_NUMBER]<[CSAandSELinventory]![LOWLIMIT],"RED")

I am trying to build a pie chart report on a form. I am using the above
to
assign colors based on my inventory levels. I know this will not fill the
pie
chart with color, but it gives me the information I want. Any help would
be
appreciated.
 

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