I'm trying to select info from multiple tables and this isn't working:
Code:
"SELECT distinct Production.API " _
                & "FROM (well_header JOIN production)" _
                & "WHERE Not production.api = well_header.api" _
                & "ORDER BY Production.API;"
I originally had this because I know that it does work for sure but when I put it in VB, I get a syntax error stating the join isn't correct but it works when I execute it from Access

Code:
"SELECT distinct Production.API " _
                & "FROM (well_header, production)" _
                & "WHERE Not production.api = well_header.api" _
                & "ORDER BY Production.API;"
Any ideas anybody??