0
votes

What criteria would I use to produce the following result for a query:

The user is prompted for a single date which returns all records within 7 days of the entered date.

I don't want the user to enter two dates.

2

2 Answers

0
votes

An Access query like this one should do the trick:

PARAMETERS StartDate DateTime;
SELECT TableName.*
FROM TableName
WHERE (((TableName.Date) Between [StartDate] And DateAdd("d",6,[StartDate])));
0
votes
PARAMETERS StartDate DateTime;
SELECT TableName.*
FROM TableName
WHERE (((TableName.EventDate)>([Startdate]-7) And (TableName.EventDate)<([startdate]+7)));

I think TableName.Date in your example is using a reserved word as a field name - you might want to change it.