Results 1 to 2 of 2
  1. #1
    kman42 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    40

    Event Log strategy

    I am creating an event log and I need to calculate a duration by comparing the date of the event to the date of the next event. What is the best strategy for doing this?

    Here is my design:

    tbl_Project
    pk_ProjectID

    tbl_Events
    pk_EventID
    EventName
    EventDescription

    tbl_EventLog


    pk_EventLogID
    fk_ProjectID
    fk_EventID
    DateOfEvent
    DurationOfEvent

    I'm not sure of the best strategy to calculate DurationOfEvent. Conceptually, it is just the time elapsed until the date of the next event or the current date if it is the last event for that project. How would I create a calculated field that would find all the events for a project, then subtract the date of the current event from the date of the next event?

    Thanks,
    Kman

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    One strategy is to use a subquery. see http://allenbrowne.com/subquery-01.html

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Customer Invoice Strategy
    By ChuckColeman1812 in forum Database Design
    Replies: 2
    Last Post: 03-12-2011, 09:00 AM
  2. VB Strategy Games - Circle Puzzle and Others
    By pkstormy in forum Code Repository
    Replies: 4
    Last Post: 03-05-2011, 03:18 AM
  3. Strategy Question
    By vassa in forum Programming
    Replies: 1
    Last Post: 01-29-2010, 10:32 AM
  4. Design strategy
    By mel_herndon in forum Database Design
    Replies: 0
    Last Post: 07-20-2009, 07:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums