Compare Previous Record (MS2000)
Here goes ....
I have a register table that contains:
COURSE CODE - ROOM - TUTOR - DAY - START TIME - END TIME
One - 202 - Somebody - Tue - 09:00 - 10:00
One - 202 - Somebody - Tue - 10:15 - 12:00
One - 202 - Somebody - Tue - 13:00 - 15:00
This is what I would like to do.
Check each next record with the previous. If the start time of the current record minus the end time of the previous record is less than 30 minutes then these two register records must be merged somehow. If 30 minutes or greater then record should remain.
So in the example above, it would now read:
One - 202 - Somebody - Tue - 09:00 - 12:00
One - 202 - Somebody - Tue - 13:00 - 15:00
I say merged, but when printing these registers, I want the details to be printed as above but the original table to remain and when the table is printed a Y placed in a field within the above original table. But a register will only be printed for one in the original table, I don't care which.
Thanks
Here goes ....
I have a register table that contains:
COURSE CODE - ROOM - TUTOR - DAY - START TIME - END TIME
One - 202 - Somebody - Tue - 09:00 - 10:00
One - 202 - Somebody - Tue - 10:15 - 12:00
One - 202 - Somebody - Tue - 13:00 - 15:00
This is what I would like to do.
Check each next record with the previous. If the start time of the current record minus the end time of the previous record is less than 30 minutes then these two register records must be merged somehow. If 30 minutes or greater then record should remain.
So in the example above, it would now read:
One - 202 - Somebody - Tue - 09:00 - 12:00
One - 202 - Somebody - Tue - 13:00 - 15:00
I say merged, but when printing these registers, I want the details to be printed as above but the original table to remain and when the table is printed a Y placed in a field within the above original table. But a register will only be printed for one in the original table, I don't care which.
Thanks