Baylah Posted September 12, 2005 Posted September 12, 2005 I have a DB that has several thousand individual records that have the following fields defined: Start_Time End_Time In this DB I have to calculate for time elapsed between those 2 times. Easy enough and done. Now my bos would like me to give him the elapsed time between the <> of Record "X" <> of record Y. Visually Start End Elapsed Record X 12:34PM 12:44PM 10 Min record Y 12:47PM 12:58PM 11 Min Elapsed between record x and y = 3 min. Anyone have any ideas on how to automate this? I can't think of anything. Thanks in advance for any help. Steve
David McQueen Posted September 13, 2005 Posted September 13, 2005 The key is to relate the second record, where you want the start time, back to the beginning record, where you want the finish time, with a StartRecordID key in the second record that equals the Prime Key in the beginning record. Your challenge will be to set up the interface so that this is done with a minimum amount of pain to the user when creating the second record. Once you have this, the elapsed time is then measured from the starting record as: RelatedRecord::StartTime - Finish Time (in current record) and can be stored as a calculated field in the beginning record. Using this approach, you can have a daisy chain of elaped times between records given there is a way to always link them as the records are created. I have a large real estate sales program for new home construction and I used a similar technique to link agreement of purchase and sale amendments to each other so that the flow of amendments could be followed and the current value would always be available. HTH Dave McQueen
Recommended Posts
This topic is 7011 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now