Log in

View Full Version : Query Question for Access


jakester
Jul 24, 2012, 01:33 PM
Hello - I'm trying to create a field in my query that will do the following:

Evaluate whether the Inactive Date field is either blank or has dates between: 7/1/12 and 7/31/12 and return the words "use for calculation"


The Inactive Date field in my table has blanks or sometimes it has dates. I'm concerned only with blank date fields and fields with dates that occur this month (July 2012).

I've been trying countless IIf formulas but I can't get it work correctly. I'm using Access 2000.

Thanks.

ScottGem
Jul 24, 2012, 01:38 PM
CheckDate: IIF(IsNull(Inactive),"use for calculation",IIF(Inactive>=#7/1/12# AND Inactive<=#7/31/12#,"use for calculation",Don't use))

That should work.

jakester
Jul 25, 2012, 06:31 AM
CheckDate: IIF(IsNull(Inactive),"use for calculation",IIF(Inactive>=#7/1/12# AND Inactive<=#7/31/12#,"use for calculation",Don't use))

That should work.

Awesome... thx, man... got it to work

ScottGem
Jul 25, 2012, 07:41 AM
Welcome