October 10, 200322 yr I am trying to create a database that will help me keep track of the miles that i drive and fuel used as well as fuel efficiency. I have a field labeled 'Current Mileage' and another labeled 'Previous Mileage'. What I would like to have happen is: Each new record created, the 'previous mileage' would automatically populate with the number that was in the 'current mileage' field in the previous record. Is this possible? thanks darron
October 10, 200322 yr It is possible, but maybe a better way is to do it by dates. This gives you more flexibility if later you want to calculate the mileage for say a given year. But to do what you want to do, you make your layout with 1 entry needed, your current mileage. You also have the field PREVIOUS which pulls the mileage currently stored in your db. Then you can have a button that runs a script that makes the calculation for mileage and replaces the mileage with the CURRENT mileage. I believe tho that using mileage by dates would be best tho. You just need to have 3 fields. DATE, MILEAGE, MPG. MPG would be a calculated field based on the mileages selected by dates. You could do so much this way. Charts, graphs, comparisons, etc etc.
October 13, 200322 yr One way to do this is to put the current mileage into a global field before creating the new record, then set the previous mileage field with the value in the global field. Set Field [gMileage, Current Mileage] New Record/Request Set Field [Previous Mileage, gMileage] HTH, Mike
October 13, 200322 yr Mike ... I'd add a couple of steps before yours: Show all records Sort (on Current Mileage, ascending) Go to Record/Request [Last] then your steps: Set Field [gMileage, Current Mileage] New Record/Request Set Field [Previous Mileage, gMileage] and finally Go To Field ["Current Mileage"]
Create an account or sign in to comment