find date clashes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database which deals with booking and scheduling of training
courses. I would like to set up a query which we could run which would tell
us if someone has been booked on 2 training courses on the same dates. (some
of the bookings are done months in advance so this is easy to do, if the
administrator is not paying attention.)
What I have is the employee details (employeeID) and what event (a course on
a particular date) that person is booked on. I want to find if that person is
booked on two events on the same date (eventdate)
Is this enough information for someone to help?

regards
 
1. Create a query into your table.

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

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

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

The query groups by employee and date, and returns those that have more than
one booking for the employee + date combination.
 
SELECT empl_1.dob, empl_1.[empl id]
FROM empl INNER JOIN empl AS empl_1 ON empl.dob = empl_1.dob
WHERE (((empl_1.[empl id])<>[empl]![empl id]))
ORDER BY empl_1.dob;

This tells if 2 employees have the same DOB but could be used for bookings.

HTH
Martin
 
Back
Top