Ok, I'm building a tech support issue tracker in Access 2003. Each ticket can be assigned a variety of statuses like "In Queue", "In Process", "Waiting For Customer Response", and "Completed". A ticket may get assigned the same status more than once (it might, for instance, be bounced back and forth between "In Process" and "Waiting For Customer Response" statuses several times).
I need to be able to track/report on how long (in total business hours and days) tickets spend in each status. As an possibly relevant aside, the list of status types is stored in a "StatusTypes" table which includes an "IsBillable" boolean field indicating whether time spent in that status is billable time, so I can calculate total billable time for a ticket as well.
My current thought is to use the AfterUpdate event of the "Ticket Status" control on my form to write a record to a StatusChangelog table (with fields: TicketID, ChangedByUserID, NewStatusID, ChangeDate, ChangeTime).
But then what? Should I also use the BeforeUpdate event of the same "Ticket Status" control to write the elapsed segment time to the last StatusChangeLog record for this ticket, or plan on trying to calculate that "segment time" value on the fly each time I need it, or?
I can think of a bunch of ways that might work for this, but none of them feel very elegant... and I hate building clunky junk! How would you approach this?
VBAjedi![[swords] [swords] [swords]](/data/assets/smilies/swords.gif)
I need to be able to track/report on how long (in total business hours and days) tickets spend in each status. As an possibly relevant aside, the list of status types is stored in a "StatusTypes" table which includes an "IsBillable" boolean field indicating whether time spent in that status is billable time, so I can calculate total billable time for a ticket as well.
My current thought is to use the AfterUpdate event of the "Ticket Status" control on my form to write a record to a StatusChangelog table (with fields: TicketID, ChangedByUserID, NewStatusID, ChangeDate, ChangeTime).
But then what? Should I also use the BeforeUpdate event of the same "Ticket Status" control to write the elapsed segment time to the last StatusChangeLog record for this ticket, or plan on trying to calculate that "segment time" value on the fly each time I need it, or?
I can think of a bunch of ways that might work for this, but none of them feel very elegant... and I hate building clunky junk! How would you approach this?
VBAjedi
![[swords] [swords] [swords]](/data/assets/smilies/swords.gif)