I was trying to simplify the problem. The record return depends on: if
month(now())= 1. If its Janurary retreive all records exept "X", if not
January retreive all records.
> Why do you think it has to have the IIf statement?
> It appears you want to return the entire record, but you have one field at
[quoted text clipped - 25 lines]
> > > > Thank you
> > > > Dave
KARL DEWEY - 26 Sep 2006 17:53 GMT
Try this --
SELECT * FROM Table1 WHERE (((Table1.Sex) Not Like
IIf(Month(Date())=1,"C"))) OR (((Table1.Sex) Like IIf(Month(Date())<>1,"*")));
> I was trying to simplify the problem. The record return depends on: if
> month(now())= 1. If its Janurary retreive all records exept "X", if not
[quoted text clipped - 29 lines]
> > > > > Thank you
> > > > > Dave
Klatuu - 26 Sep 2006 18:41 GMT
IIf(You Provide All Criteria, You Get Good Answer, You Get Incomplete Answer)
I think you will need to add a calculated field to your query to get the
filtering like you want it:
Include: Iif(Month(Now()) = 1 And [Sex] IN("M", "F"), True, IIf
Month(Now()) <> 1, True, False))
Then put True in the Criteria
> I was trying to simplify the problem. The record return depends on: if
> month(now())= 1. If its Janurary retreive all records exept "X", if not
[quoted text clipped - 29 lines]
> > > > > Thank you
> > > > > Dave