I'm sorry but I cannot seem to correct the query. As requested here is
the SQL of the errorred query:
SELECT TotalGrossWeeklyPay.dtmWorkEndingDate,
TotalGrossWeeklyPay.strFirstName, TotalGrossWeeklyPay.strLastName,
qryHourlyWeeklyTotalWages.dtmPayPeriodStartDate,
qryHourlyWeeklyTotalWages.dtmPayPeriodEndDate, [PayRate] AS Expr1, [Bonus]
AS Expr2, qryHourlyWeeklyTotalWages.txtAcceptable,
qryHourlyWeeklyTotalWages.sngRegHrsWorked,
qryHourlyWeeklyTotalWages.curPayRate,
qryHourlyWeeklyTotalWages.sngDiffHrsWorked,
qryHourlyWeeklyTotalWages.curDiffRate,
qryHourlyWeeklyTotalWages.sngOtherHrsWorked,
qryHourlyWeeklyTotalWages.curOtherRate,
qryHourlyWeeklyTotalWages.sngTotalHrs,
qryHourlyWeeklyTotalWages.curGrossWages, TotalGrossWeeklyPay.curGrossWages
FROM TotalGrossWeeklyPay INNER JOIN qryHourlyWeeklyTotalWages ON
(TotalGrossWeeklyPay.dtmWorkEndingDate=qryHourlyWeeklyTotalWages.dtmWorkEndingDate)
AND
(TotalGrossWeeklyPay.strFirstName=qryHourlyWeeklyTotalWages.strFirstName)
AND
(TotalGrossWeeklyPay.strLastName=qryHourlyWeeklyTotalWages.strLastName)
WHERE (((TotalGrossWeeklyPay.Source)="Hourly Only"));
Likewise, here is the SQL of the working query:
SELECT TotalGrossWeeklyPay.dtmWorkEndingDate,
TotalGrossWeeklyPay.strFirstName, TotalGrossWeeklyPay.strLastName,
qrySalaryWeeklyTotalWages.dtmPayPeriodStartDate,
qrySalaryWeeklyTotalWages.dtmPayPeriodEndDate,
qrySalaryWeeklyTotalWages.curPayRate, qrySalaryWeeklyTotalWages.curBonus,
qryHourlyWeeklyTotalWages.txtAcceptable,
qryHourlyWeeklyTotalWages.sngRegHrsWorked,
qryHourlyWeeklyTotalWages.curPayRate,
qryHourlyWeeklyTotalWages.sngDiffHrsWorked,
qryHourlyWeeklyTotalWages.curDiffRate,
qryHourlyWeeklyTotalWages.sngOtherHrsWorked,
qryHourlyWeeklyTotalWages.curOtherRate,
qryHourlyWeeklyTotalWages.sngTotalHrs,
qryHourlyWeeklyTotalWages.curGrossWages, TotalGrossWeeklyPay.curGrossWages
FROM (TotalGrossWeeklyPay INNER JOIN qrySalaryWeeklyTotalWages ON
(TotalGrossWeeklyPay.dtmWorkEndingDate =
qrySalaryWeeklyTotalWages.dtmWorkEndingDate) AND
(TotalGrossWeeklyPay.strLastName = qrySalaryWeeklyTotalWages.strLastName)
AND (TotalGrossWeeklyPay.strFirstName =
qrySalaryWeeklyTotalWages.strFirstName)) LEFT JOIN
qryHourlyWeeklyTotalWages ON (TotalGrossWeeklyPay.dtmWorkEndingDate =
qryHourlyWeeklyTotalWages.dtmWorkEndingDate) AND
(TotalGrossWeeklyPay.strLastName = qryHourlyWeeklyTotalWages.strLastName)
AND (TotalGrossWeeklyPay.strFirstName =
qryHourlyWeeklyTotalWages.strFirstName)
WHERE (((TotalGrossWeeklyPay.Source)="Salary Only"));
Thank you for your generous help.
John W. Vinson said:
Correct the error in your query.
If you'ld like help doing so, please post the SQL of the query so that we
can
see what the problem might be.
John W. Vinson [MVP]