Please ignore the sniping -- finding fault without offering alternatives
doesn't help much, does it?
If you are not familiar with VBA, you would have no way to tell if any
function/code you received was appropriate, whether your situation required
some modifications, nor be able to trouble-shoot it if/when it failed. I
can provide (see below) a generic set of steps, but you will need to find a
way to build, test, debug, and deploy VBA!
1. start with a sorted recordset (you could set a recordset in code to a
query, which could do the sorting)
2. start at the beginning (first date/time)
3. capture the date/time value
4. step to the next record -- quit if there are no more
5. capture the (next) date/time value
6. calculate the difference between the two date/time values
7. store the difference (you could create a table to hold these)
8. go back to #4
Best of luck!
Regards
Jeff Boyce
Microsoft Office/Access MVP