Recording mileage on a form
Posted on 2016-11-28
I have a form that has three fields. "Vehicle Used", "Starting Mileage" and "Ending Mileage". The "Starting Mileage" field is to show the last entry made in the "Ending Mileage" field UNLESS it is the first record for that vehicle. In that case the field is to show nothing.
Right now I have this in the control source of the x field but it doesn't work correctly:
=DMax("[EndingMileage]","tblTravel","[VehicleUsedID] = " & Nz([Forms]![frmTravel]![cboVehicleUsedID],0))