Selecting records within 3 weeks of current date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a query to select records that have a date under 3 weeks away from todays date.

I am using the following expression in the criteria row but it does not appear to work. Any suggestions?? (please...)

IIf(DateAdd("ww",3,Date())>[End of Tenancy],"Visible"=Yes,"Visible"=No)

Any help much appreciated,

Jackinoz
 
Hi:

Try this query --

SELECT Table1.*, Table1.MyDate
FROM Table1
WHERE (((Table1.MyDate)>DateAdd("ww",-3,Date())));

Here MyDate is your Date Field and Table1 is the Table.

Regards,

Naresh Nichani
Microsoft Access MVP

jackinoz said:
I am trying to write a query to select records that have a date under 3 weeks away from todays date.

I am using the following expression in the criteria row but it does not
appear to work. Any suggestions?? (please...)
IIf(DateAdd("ww",3,Date())>[End of Tenancy],"Visible"=Yes,"Visible"=No)

Any help much appreciated,

Jackinoz
 
Back
Top