Doug:
Formatting the value entered is not necessary with a parameter in my
experience, only with date literals, and even then only in SQL view as in
design view Access correctly interprets a date in dd/mm/yyyy format if the
system date is that format (it will automatically convert it if you switch to
SQL view). So entering #12/07/2008# as a criterion in design view will
return rows on 12 July, not 7 December on systems using a dd/mm/yyyy short
date format. Its prudent to declare parameters of date/time data type,
however, to avoid the value entered being misinterpreted as an arithmetical
expression:
PARAMETERS [Start date:] DATETIME;
SELECT *
FROM MyTable
WHERE MyDate BETWEEN [Start Date:]
AND DATEADD("d", 90, [Start Date:];
or unless the MyDate column is barred by a validation rule from accepting
date/time values with a non-zero time-of-day:
PARAMETERS [Start date:] DATETIME;
SELECT *
FROM MyTable
WHERE MyDate >= [Start Date:] AND
MyDate < DATEADD("d", 91, [Start Date:];
to catch any rows with a value on the last day of the range with a non-zero
time-of-day.
Ken Sheridan
Stafford, England
Create a query that returns all of the fields you want.
[quoted text clipped - 14 lines]
ive created an access database and i want to retrieve records between a
start [which will be entered manually] and 90days.