A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

DateDiff with variable criteria?



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.