I may have spoke to soon. I got rid of one error message but now there is a new one. I've been looking at it for a while but can't see the error.
===================================
strSQL = "SELECT [tblContractCustomers.Contract#] AS cno, "
strSQL = strSQL & "tblContractCustomers.AccountNumber AS cacctno, "
strSQL = strSQL & "tblContracts.Description AS cdesc, "
strSQL = strSQL & "tblContracts.DateWritten AS datewritten, "
strSQL = strSQL & "tblContracts.StartDate AS startdate, "
strSQL = strSQL & "tblContracts.ExpirationDate AS expdate, "
strSQL = strSQL & "tblContracts.ContractHours AS chours, "
strSQL = strSQL & "tblContracts.ContractMinutes AS cmin, "
strSQL = strSQL & "tblContracts.HoursRemaining AS hremain, "
strSQL = strSQL & "tblContracts.MinutesRemaining AS mremain, "
strSQL = strSQL & "tblAccounts.AccountNumber AS anum, "
strSQL = strSQL & "tblAccounts.AccountName As cust "
strSQL = strSQL & "FROM tblAccounts INNER JOIN ( tblContractCustomers "
strSQL = strSQL & "INNER JOIN tblContracts "
strSQL = strSQL & "ON [tblContractCustomers.Contract#] = tblContracts.ContractNumber ) "
strSQL = strSQL & "ON tblAccounts.AccountNumber = tblContractCustomers.AccountNumber "
strSQL = strSQL & "WHERE tblContracts.HoursRemaining > '" & strZero & "' "
strSQL = strSQL & "OR tblContracts.MinutesRemaining > '" & strZero & "' "
strSQL = strSQL & "ORDER BY tblContracts.ContractNumber DESC "
==============================
The error is - Invalid bracketing of name '[tblContractCustomers.Contract#]'.
- it's in the ON statement but I can't see a problem. Thanks for any additional help you may be able to give me.
Riley