Now, I am using lookups within my table to auto-fill predetermined types of maintenance. In my query I have my last function actually looking at the lookup table as that is the only thing that seems to be returning values oddly enough. When I point the lookup directly at the maintenance table itself it cannot recognize the field values.
Below is my SQL code.
CODE
SELECT tblMaintenance.Link,
Last(tblMaintenance.MYear) AS LastOfMYear,
tblHistoryLookup.Type,
tblHistoryLookup.[Life Expectancy]
FROM tblRoadwayInfo
INNER JOIN
(tblHistoryLookup
INNER JOIN
tblMaintenance
ON tblHistoryLookup.ID = tblMaintenance.[Maintenance Type])
ON tblRoadwayInfo.Link = tblMaintenance.Link
GROUP BY
tblMaintenance.Link,
tblHistoryLookup.Type,
tblHistoryLookup.[Life Expectancy];
Last(tblMaintenance.MYear) AS LastOfMYear,
tblHistoryLookup.Type,
tblHistoryLookup.[Life Expectancy]
FROM tblRoadwayInfo
INNER JOIN
(tblHistoryLookup
INNER JOIN
tblMaintenance
ON tblHistoryLookup.ID = tblMaintenance.[Maintenance Type])
ON tblRoadwayInfo.Link = tblMaintenance.Link
GROUP BY
tblMaintenance.Link,
tblHistoryLookup.Type,
tblHistoryLookup.[Life Expectancy];
Edited by: sup909 on Fri May 8 15:24:46 EDT 2009.
EDIT: SQL script to prevent horizontal scrolling. Doug
Edited by: DougY on Fri May 8 17:09:34 EDT 2009.