G
Guest
I'm trying to figure out the best way to go about creating something to track
when vehicles are due for their next maintenance.
I've created the tblVehciles, with the VIN, License, Make, etc, and the
tblMaintenance, which will track the DateofService, Mileage,
ServiceCompleted. Under ServiceCompleted I have a list to choose from, Oil
Change, Tire rotation, Oil/Tire Rotation, Mileage (just a mileage entry), and
Other.
What I want to happen is to create an autoexe Macro that will run every
Monday to pull up a report that will show if any vehicle is coming due for a
change. I know how to do the Macro, just trying to figure out the best way
to construct the query. There will be at least one entry per month for
vehicle where mileage is entered since those are turned in monthly, so that
entry would have Mileage under the ServiceCompleted field. I need to somehow
query to find the last entry with Oil Change, and compare that entry's
mileage to the last entry's mileage. I also need to check that entry's
DateofService to the current date to make sure it hasn't gone past 6 months.
I'd really like to have it warn if it's within 200 miles of going 3000 miles
since the last change or within one month of going 6 months since the last
change.
I'd like to do the same thing for Tire Rotations, but that would just be
every 6,000 miles. Any ideas would be appreciated.
when vehicles are due for their next maintenance.
I've created the tblVehciles, with the VIN, License, Make, etc, and the
tblMaintenance, which will track the DateofService, Mileage,
ServiceCompleted. Under ServiceCompleted I have a list to choose from, Oil
Change, Tire rotation, Oil/Tire Rotation, Mileage (just a mileage entry), and
Other.
What I want to happen is to create an autoexe Macro that will run every
Monday to pull up a report that will show if any vehicle is coming due for a
change. I know how to do the Macro, just trying to figure out the best way
to construct the query. There will be at least one entry per month for
vehicle where mileage is entered since those are turned in monthly, so that
entry would have Mileage under the ServiceCompleted field. I need to somehow
query to find the last entry with Oil Change, and compare that entry's
mileage to the last entry's mileage. I also need to check that entry's
DateofService to the current date to make sure it hasn't gone past 6 months.
I'd really like to have it warn if it's within 200 miles of going 3000 miles
since the last change or within one month of going 6 months since the last
change.
I'd like to do the same thing for Tire Rotations, but that would just be
every 6,000 miles. Any ideas would be appreciated.