IIF Problems - Multiple Expressions

Psilokan

Computer Programmer
Local time
Today, 10:20
Joined
Oct 4, 2005
Messages
20
Could someone please point out to me what's wrong with this query?

Sum(IIf([ProgCode] LIKE "004*" Or "0058",1,0))

I get a syntax error when I try to run it. If I take out the "OR '0058'" part, the query will evalute properly. However once I try to add in the OR statement it stops working. I have also tried "OR LIKE '0058'" and recieved the same error. In addition to that, I have also tried the equals operator instead of the LIKE operator.

Thanks
 
Sum(IIf([ProgCode] LIKE "004*" Or [ProgCode] = "0058",1,0))

^
 
lol, thanks
Actually just figured this on my own and came back to post a "nevermind, I'm an idiot" reply.

Thanks for the help though :P
 

Users who are viewing this thread

Back
Top Bottom