Query Expression

G

Greg

My database has three date fields. I can query field 1 for <What date? I want
to also include in query other fields if they are also < field 1 date, but
not list if > than field 1 date. This is for producing a report with all
products listed with < what date, all on one report vs. three different
reports.
 
J

John Vinson

My database has three date fields. I can query field 1 for <What date? I want
to also include in query other fields if they are also < field 1 date, but
not list if > than field 1 date. This is for producing a report with all
products listed with < what date, all on one report vs. three different
reports.

Sounds like a possible table design flaw, but...

Put in two calculated fields in your Query:

SearchDate2: IIF([date2] < [date1], [date2], [date1])
SearchDate3: IIF([date3] < [date1], [date3], [date1])

and put the criteria on these two fields in addition to [date1]. Put
the criteria on three different lines so it will use OR logic.

John W. Vinson[MVP]
 
Top