lowest date for each record

J

jean.ulrich

Hi

I have 2 tables
One is an employe's table (TB-Employees) and the second is a time
sheet table (TB-TimeSheet) as I record worked hours for each employee
and every day.
As employees have not start working on the same day, I would like a
query that show for each employee tha lowest date (date I have start
record working hours for each one)
The relation between the 2 tables is [EmpNo]
example:

employee N°1 records for the 1, 2, 3, 4, 5, 6 .....june
employee N°2 records for the 6, 7, 8, .....june
employee N°3 records for the 1, 2, 3 .....september

Result I want

Employee N°1 1 june
Employee N°2 6 june
Employee N°3 1 september

So I should have a query including the 2 tables with [EmpNo] as a
relation and a calculated field that should use a fonction

thanks
 
A

Allen Browne

See:
Getting a related field from a GroupBy (total) query
at:
http://www.mvps.org/access/queries/qry0020.htm

BTW, use Min for the lowest daate.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.


I have 2 tables
One is an employe's table (TB-Employees) and the second is a time
sheet table (TB-TimeSheet) as I record worked hours for each employee
and every day.
As employees have not start working on the same day, I would like a
query that show for each employee tha lowest date (date I have start
record working hours for each one)
The relation between the 2 tables is [EmpNo]
example:

employee N°1 records for the 1, 2, 3, 4, 5, 6 .....june
employee N°2 records for the 6, 7, 8, .....june
employee N°3 records for the 1, 2, 3 .....september

Result I want

Employee N°1 1 june
Employee N°2 6 june
Employee N°3 1 september

So I should have a query including the 2 tables with [EmpNo] as a
relation and a calculated field that should use a fonction

thanks
 

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

Similar Threads

Payroll Database - Need Help!! 1
date overlap 7
how to limit the record number 2
UNION query 11
grouping with a total 1
Query By Date and Count Records 3
Date overlap***UP*** 1
conditional reporting 4

Top