Im trying to inner join 4 tables.
But I'm getting the error incorrect sytax near '='. How can I solve this?
Code: Select all
strSQL = "SELECT BillDetail.ItemCode,CashMain.BilledPersonName,CashMain.BillType, CashMain.BillPersonID, CashMain.BilledAddress, region.regionname, country.countryname FROM ((CashMain INNER JOIN country On CashMain.BilledPersonCountry = country.countrycode)INNER JOIN region On CashMain.BilledPersonregion = region.regioncode) INNER JOIN BillDetail On CashMain.BillID = BillDetail.BillNo WHERE CashMain.BillID=" & Range("L9").Value