SELECT ...
WHERE ( [RecordStartDateTime] BETWEEN DateAdd("h", 22, [Enter Start Date:])
AND DateAdd("h", 8, [Enter End
Date:]) )
OR ( [RecordEndDateTime] BETWEEN DateAdd("h", 22, [Enter Start Date:])
AND DateAdd("h", 8, [Enter End
Date:]) )

Signature
HTH
Van T. Dinh
MVP (Access)
> Hello, I apologize if this is a duplicate, can't find my post.
>
[quoted text clipped - 4 lines]
>
> Thanks, Mary
Thanks, that worked!
To save one prompt, is it possible to have users enter one date, and list
records that start on the date entered at 22:00 or later and end by 08:00 the
day after the date entered?
> SELECT ...
> WHERE ( [RecordStartDateTime] BETWEEN DateAdd("h", 22, [Enter Start Date:])
[quoted text clipped - 14 lines]
> >
> > Thanks, Mary
Ofer - 29 Jun 2005 20:47 GMT
You can use the dateadd function, when you ask for one parameter
SELECT ...
WHERE ( [RecordStartDateTime] BETWEEN DateAdd("h", 22, [Enter Date:])
AND DateAdd("h", 8,
dateadd("d",1,[Enter Date:])) )
OR ( [RecordEndDateTime] BETWEEN DateAdd("h", 22, [Enter Date:])
AND DateAdd("h", 8,
dateadd("d",1,[Enter Date:])) )
> Thanks, that worked!
>
[quoted text clipped - 20 lines]
> > >
> > > Thanks, Mary
Mary - 29 Jun 2005 23:26 GMT
Awesome - Thanks!
> You can use the dateadd function, when you ask for one parameter
>
[quoted text clipped - 30 lines]
> > > >
> > > > Thanks, Mary
Van T. Dinh - 29 Jun 2005 23:32 GMT
Try:
SELECT ...
WHERE ( [RecordStartDateTime] BETWEEN DateAdd("h", 22, [Enter Date:])
AND DateAdd("h", 32, [Enter Date:]) )
OR ( [RecordEndDateTime] BETWEEN DateAdd("h", 22, [Enter Date:])
AND DateAdd("h", 32, [Enter Date:]) )

Signature
HTH
Van T. Dinh
MVP (Access)
> Thanks, that worked!
>
> To save one prompt, is it possible to have users enter one date, and list
> records that start on the date entered at 22:00 or later and end by 08:00 the
> day after the date entered?