H
hughess7
Hi all
I want to return the 'current' car assigned to a member of staff in an
expenses form if mileage is selected in the description field.
The Table tblVehicles holds all the car details with the field SpecID
containing who owns the car and StartDate being the date they first used the
car. Some members of staff can have two cars to choose from which are still
current but I set the StartDate of the less popular car to be older than the
most popular so it always defaults to the more popular one.
I created a totals query called qry Current Vehicle, using tblVehicles
returning Max of StartDate, Last of RegNum and Last of VehicleID (named car).
I have got it to work by using a dlookup function in vba (dlookup"car","qry
Current Vehicle") but I just want to check if there is a better/easier way?
Thanks in advance for any help.
Sue
I want to return the 'current' car assigned to a member of staff in an
expenses form if mileage is selected in the description field.
The Table tblVehicles holds all the car details with the field SpecID
containing who owns the car and StartDate being the date they first used the
car. Some members of staff can have two cars to choose from which are still
current but I set the StartDate of the less popular car to be older than the
most popular so it always defaults to the more popular one.
I created a totals query called qry Current Vehicle, using tblVehicles
returning Max of StartDate, Last of RegNum and Last of VehicleID (named car).
I have got it to work by using a dlookup function in vba (dlookup"car","qry
Current Vehicle") but I just want to check if there is a better/easier way?
Thanks in advance for any help.
Sue