Jim Hewson
JHewson at karta.com
Thu Nov 6 07:13:50 CST 2003
I believe the commas are messing this up. Access is looking at the commas and determining the False Part wrong. eg: ...iif([code]='506', [Telling]*0.67, iif... a comma between 0 and 67 Access thinks 67 is the false part. One question I have, is why the single quote marks around numbers? I normally don't use them. Jim -----Original Message----- From: Gustav Brock [mailto:gustav at cactus.dk] Sent: Thursday, November 06, 2003 5:32 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] why isn't this working? Hi Pedro It should probably read: iif([Code]='501',[Telling]*1,iif([Code]='503',[Telling]*2,iif([Code]='507',[ Telling]*2,iif([Code]='506',[Telling]*0,67,iif([Code]='502',[Telling]*0,4,ii f([Code]='522',[Telling]*0,4,iif([Code]='542',[Telling]*0,2,iif([Code]='500' ,[Telling]*0,0)))))))) /gustav > i can't seem to let this query work. Why? > Pedro Janssen > SELECT > iif([Code]='501',[Telling]*1),iif([Code]='503',[Telling]*2),iif([Code]='507' ,[Telling]*2),iif([Code]='506',[Telling]*0,67),iif([Code]='502',[Telling]*0, 4),iif([Code]='522',[Telling]*0,4),iif([Code]='542',[Telling]*0,2),iif([Code ]='500',[Telling]*0) > AS Resultaat_Telling > FROM TellingCode; _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com