I use a table to record time spent on various projects. When I start working on a particular project, I add a row to the table, this row including a field showing the Date that I started. When I (temporarily) have to stop that project to work on another one, I add another row to the table, the Date on that row showing the date that I started work on that second project, etc, etc. I then return to the first project and add another row to show that I am working on it again, and so on.
At the moment, I move the table to Excel and use formulae that compare the dates on the first and second rows (and so on) to determine the duration of each task. In Excel, each row therefore contains a field (cell) that holds the duration of the task for which the start date is shown on that row.
I hope I've been reasonably clear!! Anyway, what I would like to do is perform the same calculations in Access as it is much better at producing reports, etc for the projects. I have read (and tried) KB article Q101081 "ACC: Referring to a Field in the Previous or Next Record", but that is specifically for calculating fields on FORMS. I have tried altering it to perform the same calculations on queries, but I can't get it to work.
Could someone please explain how I could achieve the results that I need?
Thanks in advance,
Brian
At the moment, I move the table to Excel and use formulae that compare the dates on the first and second rows (and so on) to determine the duration of each task. In Excel, each row therefore contains a field (cell) that holds the duration of the task for which the start date is shown on that row.
I hope I've been reasonably clear!! Anyway, what I would like to do is perform the same calculations in Access as it is much better at producing reports, etc for the projects. I have read (and tried) KB article Q101081 "ACC: Referring to a Field in the Previous or Next Record", but that is specifically for calculating fields on FORMS. I have tried altering it to perform the same calculations on queries, but I can't get it to work.
Could someone please explain how I could achieve the results that I need?
Thanks in advance,
Brian