View Single Post
  #3  
Old May 20th, 2010, 02:30 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Help with expression builder in a Query to retrieve wanted dates

On Tue, 18 May 2010 12:59:19 -0700, Access Rookie
wrote:

I want to design a query or report to retrieve dates from Field A. The
criteria is:
Field A must be filled (i.e. there is a date, not a blank); and
when dates in any field of B or C or D are not blank, A must be more recent
than this/those date(s).


You can make use of the NZ() function:

[A] NZ([b], [A]) AND [A] NZ([C], [A]) AND [A] NZ([C], [A])

Since date A will not be later than itself, this criterion will only be true
if there is a date in A (otherwise the whole expression would be NULL and
treated as false), and if there is a date in one of the other fields it must
be earlier than A.
--

John W. Vinson [MVP]