Help with timesheet query

L

Leanne

I've been asked to create a query that will allow the supervisor to
find all employees working between given times. So far, using Between,
I've been able to find all whose start time is during the set
parameters and whose end time is during them also. What I can't figure
out how to do is get the names of those who are working during the
given parameters, but actually start before
or those who start working during the given times, but stop after.

For example:

Selected time range: 10am - 2pm

How do I get it to give me someone who actually starts at 8am but
finished at 1pm or someone who starts at 11am but finished at 3pm?

I'm not sure I've explained this well, but any help would be
appreciated.

Thanks.
 
D

Duane Hookom

Try a where condition like:
WHERE [StartTime] < Forms!frmTimes!txtEndTime AND
[EndTime]>Forms!frmTimes!txtStartTime
 
L

Leanne

That was just the thing! Thanks.

Try a where condition like:
WHERE [StartTime] < Forms!frmTimes!txtEndTime AND
[EndTime]>Forms!frmTimes!txtStartTime

--
Duane Hookom
Microsoft Access MVP



Leanne said:
I've been asked to create a query that will allow the supervisor to
find all employees working between given times. So far, using Between,
I've been able to find all whose start time is during the set
parameters and whose end time is during them also. What I can't figure
out how to do is get the names of those who are working during the
given parameters, but actually start before
or those who start working during the given times, but stop after.
For example:
Selected time range: 10am - 2pm
How do I get it to give me someone who actually starts at 8am but
finished at 1pm or someone who starts at 11am but finished at 3pm?
I'm not sure I've explained this well, but any help would be
appreciated.
Thanks.- Hide quoted text -

- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top