sql using input date

K

Kathy

With user input date and times I am attempting to gather
data for a week, month, etc. by shift.

Access in inserting some kind of default(?) date of
12/30/1899.

How can I get this date to go off the user entered 'Start
Date' which will vary each time it is ran, and only select
those for the specified times.

I know that for a single day you can just input times
after the dates, but I need multiple day's counts
by 'shift'.

Currently the code is:

SELECT Activity.[Start Time & Date], Activity.[Start Time
& Date] AS Test, Activity.StartTimeOnly
FROM Activity
WHERE (((Activity.[Start Time & Date])>[Enter Shift Start
Date and Time] And (Activity.[Start Time & Date])<[Enter
Shift End Date and Time]) AND ((Activity.[Start Time &
Date])>#12/30/1899 6:0:0#) AND ((Activity.StartTimeOnly)
<#12/30/1899 14:0:0#));

Thanks!
 
Top