View Single Post
  #1  
Old May 3rd, 2010, 09:18 PM posted to microsoft.public.access.queries
Jim
external usenet poster
 
Posts: 39
Default DateDiff with variable criteria?

I have a query field that uses DateDiff("d",[dtmDateShipped],[dtmDatePaid])
to calculate the difference between a ship date and paid date. I also have
=50 in the criteria row to restrict payments to 50 days or less.



I need to change the criteria to =80 for a couple customers. I've tried
using IIf([tblCustomerUS.strCustomerId] In ("LE4212","AM0303"),=80,=50) in
the criteria row as a sub query, but I get no results at all. Any
suggestions on how to set this up correctly?

Thanks



Jim