You can this several ways
One way is to do a union, with one query returning the first, and the other query returning the last.
Select * From ThisTable Where TimeIn = (Select Max(TimeIn) From ThisTable)
Union
Select * From ThisTable Where TimeOut = (Select Max(TimeOut) From ThisTable)
Of course, this doesn't take into account that there might be two records with exaclty the same time in or time out, and therefore you need to further limit the result for each select in the union to return only the "Top 1" record. This is done differenlty depending on the db you are using.
Woody Z
http://www.learntoprogramnow.com