finding overlaps

  • Thread starter Thread starter Jeff Klein
  • Start date Start date
J

Jeff Klein

I have a query that shows all employee schedules: EmployeeID, MeetingDate,
CustomerID.

I need to have a query that shows if I have multiple EmployeeID's scheduled
with the same CustomerID on the same day. I am trying to avoid accidentally
scheduling two employees with the same customer on the same day.

Where do I start?
 
1. Create a query into this table.

2. Depress the Total button on the toolbar (upper sigma icon).
Access adds a Total row to the grid.

3. Drag MeetingDate and CustomerID into the grid.
Accept Group By in the Total row under these fields.

4. Drag EmployeeID into the grid.
In the Total row under this field, choose Count.
In the Criteria row, enter:

The query groups by customer and date, and returns the entries where there
is more than one meeting for the customer on the one date.

If you wanted only *different* employees on the same date, the query would
be different.
 
Allen, Thanks for the reply.
OK...This shows records that duplicate meetings on the same day for a
client.
Now let me take this a step further. I also have StartTime and an EndTime
fields. Can I only show records that overlap StartTime's and EndTime's? If
my client is being visited twice a day these records are not a conflict and
should not show in the new query. Getting complicated!!


This is a feature of queries that I have not explored yet...I am already
thinking of other uses in other projects. Thank you for all your help. Jeff
 
Back
Top