Link to home
Start Free TrialLog in
Avatar of colin911
colin911

asked on

Query Min and difference

Hi There,

I have the attached database and I am working on the ActualVSsched query.  The query puts the InTime from tblClockTime and the InSched from tblEmployeeSchedule on the same view and I am trying to do two things:

1.There are several ClockTimes for each employee for the same day.  So for EG, Francoise clocks in on the 22nd May twice, once at 8:17 and once at 14:46.   I am trying to have the query show only the FIRST time any of the employees clock in for that day. In my example above, the query would only show the record that contains Francoise's clock time of 8:17.  

2. I want to make another field in the query that would subtract the InSched from the InTime but only if the InTime is greater than the InSched.  In plain english, if the employee is late, how late in minutes is that employee?

I am so new to databases that I am at a loss as to where to put this.  Trying to learn!

Any help appreciated.
EmployeeDatabaseV3.accdb
ASKER CERTIFIED SOLUTION
Avatar of santoshmotwani
santoshmotwani
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of colin911
colin911

ASKER

Thank you both very much for your help.  Santos, you have the most elegant solution since it is only one query.  Chaau, I am learning so I like the see the alternate approach.