Selecting records within 3 weeks of current 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
 
N

Naresh Nichani MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top