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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date
How do I write a query that when someone serches for a date in my date field
it will return dates four days before and four day after, the date that was inputted. |
#2
|
|||
|
|||
Date
Assuming the search date is entered in MyDate on the form MyForm, use the
following expression in the criteria of your date field: Between DateAdd("d",-4,Forms!MyForm!MyDate) And DateAdd("d",4,Forms!MyForm!MyDate) Steve "Gilbo" wrote in message ... How do I write a query that when someone serches for a date in my date field it will return dates four days before and four day after, the date that was inputted. |
#3
|
|||
|
|||
Date
Between InputtedDate - 4 And InputtedDate + 4
or Between DateAdd("d", -4, InputtedDate) And DateAdd("d", 4, InputtedDate) hth "Gilbo" wrote in message ... How do I write a query that when someone serches for a date in my date field it will return dates four days before and four day after, the date that was inputted. |
Thread Tools | |
Display Modes | |
|
|