Access 2010 Novice! I have 2 tables - Daily Trip Log and Daily Trip Log Stops. Daily Trip Log Fields are dtlID (Autonumber), departdate, departtime, departmiles, arrivetime, arrivemiles, totalmiles, and totaldrivinghours. Daily Trip Log Stop Fields are dtlID (Autonumber), date, reasonforstop, stoptime, mileage, placestopped, and departtime.
A driver can stop many times during the day for deliveries, lunch, fuel, etc.
My Form is Daily Trip Log with a subForm Daily Trip Log Stops.
When a driver enters the departdate on the primary form I would like the departmiles to automatically populate using the previous days arrivemiles. I have tried DLast to no avail.
Total time is arrivalmiles minus departmiles and totaldrivinghours is arrivetime minus departtime. In addition to this I would like to know how to add the numerous days stops enroute (departtime minus stoptime) to then be deducted from the daily total driving hours.
Everything works fine except having the departmiles on the new record reflect the arrivemiles from the previous day and how to total the amount of stopped time for all the stops during the day.
Thank you in advance.