Hi Guys. I have a table that stores staff and their daily sickness record (fields: EmployID, SickDate). I want to create a code (using loop thorugh recordset) to generate a new table(fields: EmployID, SickFrom, SickTill) that stores the range of sick leave of each employee. So for example if the first tablethe first record reads: Employee A is sick on 1.1.2012, record 2 reads employee A sick on 2.1.2012, record 3 reads employee A sick on 5.1.2012, record 4 reads employee B sick on 2.1.2012 and record 5 reads employee B sick on 3.1.2012. I want the code to store the following in table 2: Employee A sick from 1.1.2012 till 2.1.2012, a new record reads employee A sick from 5.1.2012 till 5.1.2012 and a new record reads employee b sick from 2.1.2012 till 3.1.2012.