Need Help with an IF statement

  • Thread starter Thread starter DevilDog1978
  • Start date Start date
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.
 
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
 
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.
 
Back
Top