0

Access gives me a runtime error 3075 Syntax Error (missing operator). The SQL works in MS SQL Server 2012 but it doesn't work in Acces. Can someone help me?

Code:

CurrentDb.OpenRecordset("SELECT Gebruiker.[emailadres] FROM Voorwerp INNER
JOIN Bod ON Voorwerp.[Voorwerpnummer] = Bod.[Voorwerpnummer] INNER JOIN
[Gebruiker] ON Gebruiker.[GebruikersID] = Bod.[GebruikersID] WHERE Voorwerp.
[Voorwerpnummer] = 1")

Thank you in advance!

Carsten Flokstra

1 Answer 1

5

MS Access requires more parentheses for joins. Try this:

SELECT Gebruiker.[emailadres]
FROM (Voorwerp INNER JOIN
      Bod
      ON Voorwerp.[Voorwerpnummer] = Bod.[Voorwerpnummer]
     ) INNER JOIN
     [Gebruiker]
     ON Gebruiker.[GebruikersID] = Bod.[GebruikersID]
WHERE Voorwerp.[Voorwerpnummer] = 1;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.