S
Secret Squirrel
I have the following query that I'm trying to lookup a value in my
tblAccruals. I'm trying to match my "YearsAccrued" with my tblAccruals and
then have it return the value in the "AccrualDays" field from the
tblAccruals. Does this look right? It's not working and its telling me I have
an ambiguous outer join.
SELECT tblEmployees.ID, qryVacationUsed.DaysCount AS VacationDaysUsed,
DateDiff("yyyy",[StartDate],Date()) AS YearsAccrued,
DLookUp([AccrualDays],[tblAccruals],[AccrualID]=[YearsAccrued]) AS Expr1
FROM tblAccruals, tblEmployees LEFT JOIN qryVacationUsed ON tblEmployees.ID
= qryVacationUsed.EmpID;
tblAccruals. I'm trying to match my "YearsAccrued" with my tblAccruals and
then have it return the value in the "AccrualDays" field from the
tblAccruals. Does this look right? It's not working and its telling me I have
an ambiguous outer join.
SELECT tblEmployees.ID, qryVacationUsed.DaysCount AS VacationDaysUsed,
DateDiff("yyyy",[StartDate],Date()) AS YearsAccrued,
DLookUp([AccrualDays],[tblAccruals],[AccrualID]=[YearsAccrued]) AS Expr1
FROM tblAccruals, tblEmployees LEFT JOIN qryVacationUsed ON tblEmployees.ID
= qryVacationUsed.EmpID;