Newbies spider Posted January 3, 2010 Newbies Posted January 3, 2010 I need to track mileage from one week to the next. * I need to initialize a record with the current milage (beginning odometer) reading. * One week later, enter milage for the week ending in a new record (ending odometer reading) and display the beginning odometer reading from the previous week (record). * Calculate the difference between the beginning odometer reading and the ending odometer reading. Make this value available for further calculations. * Repeat this process each week (a new record for each week ending) using the previous weeks ending odometer reading as the current weeks beginning odometer reading.
efen Posted January 3, 2010 Posted January 3, 2010 Welcome to the forums Something like the attached? miles.zip
Newbies spider Posted January 3, 2010 Author Newbies Posted January 3, 2010 Thanks. 1. Why is weektotal "Unstored"? 2. Can the "endmiles" from a previous record be automatically entered into the "startmiles" of a new record?
comment Posted January 3, 2010 Posted January 3, 2010 Can the "endmiles" from a previous record be automatically entered into the "startmiles" of a new record? Yes. You can set the startmiles field to lookup or auto-enter the previous endmiles value. For this, you will need to define a relationship to the previous record first.
efen Posted January 3, 2010 Posted January 3, 2010 Can the "endmiles" from a previous record be automatically entered into the "startmiles" of a new record? The sample file does enter the startmiles for a new record [?]
Newbies spider Posted January 3, 2010 Author Newbies Posted January 3, 2010 (edited) I'm sorry efen; I used your form incorrectly. It works perfectly. Thank you. I would not have ever figured that out on my own. I also need to sort on vehicle ID because I have more than one vehicle stored in the database, and then find the sum of the week ending milages for a quarter for each vehicle (Jan 1-Mar 31, Apr 1-Jun 30, Jul 1-Sep 30, Oct 1-Dec 31) and display them in a field for further use. Edited January 4, 2010 by Guest Clarification
efen Posted January 4, 2010 Posted January 4, 2010 See attached for one way - this needs extra error traps and could probably be simplified, but it's a start miles2.zip
Newbies spider Posted January 5, 2010 Author Newbies Posted January 5, 2010 Thanks efen. Your "start" is way beyond what I expected. I will look at it and see if I can figure out how it works. I dont know how to add traps so I will try to use what you've given me. Thanks again.
Recommended Posts
This topic is 5506 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