Sam Summers
Registered User.
- Local time
- Today, 10:40
- Joined
- Sep 17, 2001
- Messages
- 939
Hi everyone,
I'm trying to add a field to my continuous form that will show the last record entered for Km or Hours for vehicles.
I added the table to my form query so the sequel looks like this:
But i am getting the error message attached when i try and run it:
I will keep trying to figure it out but if anyone can assist?
Many thanks in advance
I'm trying to add a field to my continuous form that will show the last record entered for Km or Hours for vehicles.
I added the table to my form query so the sequel looks like this:
Code:
SELECT DISTINCT Machine.MachineID, Machine.ManufacturerRef, Machine.MechanicID, Machine.Type, Machine.Manufacturer, Machine.Model, Machine.RegSerialNo, Machine.VINNumber, Machine.Status, Machine.Location, Machine.OutOfServiceDate, Machine.BackInServiceDate, Machine.PersonResponsible, Machine.CategoryID, Machine.Documents, Machine.Insurance, Machine.Tax, Category.Category, Status.Status, Status.Colour, Type.Type, Manufacturer.ManufacturerName, Location.[Current Location], Location.[Current Location], Machine.CurrentOperator, Machine.Delete, ServiceHistory.KmHours
FROM (Category RIGHT JOIN (Mechanic RIGHT JOIN (Manufacturer RIGHT JOIN (((Machine LEFT JOIN Status ON Machine.Status = Status.StatusID) LEFT JOIN Type ON Machine.Type = Type.TypeID) LEFT JOIN Location ON Machine.Location = Location.LocationID) ON Manufacturer.ManufacturerID = Machine.ManufacturerRef) ON Mechanic.PersonID = Machine.MechanicID) ON Category.CategoryID = Machine.CategoryID) INNER JOIN ServiceHistory ON Machine.MachineID = ServiceHistory.MachineID
WHERE (((Machine.Delete)=No) AND ((ServiceHistory.KmHours)=Last("KmHours")))
ORDER BY Machine.Type, Machine.Model;
But i am getting the error message attached when i try and run it:
I will keep trying to figure it out but if anyone can assist?
Many thanks in advance