Question : Issues adding criteria in Query

I am attaching a screen shot of the query I am working on.  I need to have the query return records where the Expiration field is between today's date and today's date plus 30 days.  I'm trying to put the following in as Criteria:

Between (Date()) And (Date()+30)

However, I keep getting a compile error.

This is the full contents of the Expiration field -

Expiration: IIf([FormNum]="IRS 668-A",([HoldDate]+1),IIf([Agency]="State Board of Equalization",([HoldDate]+365),IIf([Agency]="Employment Development Department",([HoldDate]+365),IIf([Agency]="Wisconsin Department of Revenue",([HoldDate]+1),IIf([Agency]="New York State Department of Labor",([HoldDate]+90))))))

Answer : Issues adding criteria in Query

Hi,

Change your formula to force a date return:

Expiration: CDate(  IIf([FormNum]="IRS 668-A",([HoldDate]+1),IIf([Agency]="State Board of Equalization",([HoldDate]+365),IIf([Agency]="Employment Development Department",([HoldDate]+365),IIf([Agency]="Wisconsin Department of Revenue",([HoldDate]+1),IIf([Agency]="New York State Department of Labor",([HoldDate]+90)))))) )

Regards,

Bill
Random Solutions  
 
programming4us programming4us