Results 1 to 2 of 2

Thread: Odometer Flip

  1. #1
    Join Date
    Apr 2004

    Unanswered: Odometer Flip

    I have a question about how I could possibly allow for something in a DB I've created. Any and all replies are appreciated. I wrote a DB to track IFTA fuel tax state miles and gallons based on trips that trucks in our fleet take. My problem is this I record beginning and ending odometer readings and subsequent trip miles. My problem is that I've got a unit that is about 40000 miles from flipping over to zero. Obviously this creates a problem with the situation that you have a trip starting at 990000 miles and ending at 10 miles. I know I could code around this problem by checking for that unit number adding a million to the miles etc, but I was wondering if anyone else has another idea or has run into something similar. Again, thanks for any replies.

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    iif(endMiles < startMiles, (endMiles + 1000000) - startMiles, endMiles - startMiles)

    Basically, if the end mile number smaller then the start mile number, then add 1mil to the total.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts