View Full Version : IFF Criteria


LuukVaessen
11-14-2005, 07:01 AM
Hello All,

I have already read some of the IFF threads on this forum and tried multiple solutions that have been provided on this site, but somehow Access keeps coming up with the ''#error''.

The following syntax was plugged into SQL view

SELECT IIf([Group by Fund + Date].[Date]='31/12/1994','1','0') AS D
FROM [Group by Fund + Date]

I have no clue why it doesnt work.

I appreciate any help!

Thanks

Luuk

neileg
11-14-2005, 07:49 AM
Try
SELECT IIf([Group by Fund + Date].[Date]=#31/12/1994#,1,0) AS D
FROM [Group by Fund + Date]

However, [Date] is a reserved word in VBA and may be causing a problem, too. You would be well advised to change this field name, even if the above fix works.

LuukVaessen
11-14-2005, 07:56 AM
Cheers mate!

Works brilliantly. Now i can start using this query in combination with some more challenging nested queries, so i might have to come back to you :D.

I didnt have any problems with that header yet.

neileg
11-14-2005, 08:00 AM
I didnt have any problems with that header yet.
You will, you will...