August 22, 200025 yr I have a database which calculates times for a motor race. The unique fields are passing time and car no. I calculate everything from these. Some calculations (eg time between two cars) I do by subtracting a value in the current record (eg passing time) from its value in the previous record. What's the best way to do this? Can I use the "AutoEnter from Last Record" feature? I'm importing 100 records at a time, so I'm not creating new records here. What I've done for now is to write a script that works through all the records and cuts and pastes values from one record to the next. This works well and gives correct results. However, I would like to speed it up. For a 2 hour race, my calculations take 2 minutes - not much good if I want to publish updated times on the web every 30s. Any suggestions would be very much appreciated.
August 23, 200025 yr If you ALWAYS want to find the time between two records in entry order, this will work: Define Fields: Record# = Status(CurrentRecordID) Last Record# = Record# - 1 Time Define Relationship with same file (call relationship "LastCar"): Last Record# matches Record# Define Field: Elapsed Time = Time - LastCar::Time Again, as long as you want the elapsed time to be between records in creation order, this will work. If you want to differentiate by Car# or something, you must build a more complex relationship. -bd
Create an account or sign in to comment