I have always problems with the way sql-strings are constructed. You have to read the whole line and find if it contains the necessary space and ampersand.
Why not place them at the beginning of the line? In one glance you can see if all is correct:
Imb.
Why not place them at the beginning of the line? In one glance you can see if all is correct:
active_sql = "SELECT Gebeurtenis_tbl.Gebeurtenis_id FROM ((Gebeurtenis_tbl" _
& " INNER JOIN Status_tbl ON Status_tbl.Status_id = Gebeurtenis_tbl.Status_id)" _
& " INNER JOIN Deelnemer_tbl ON Deelnemer_tbl.Gebeurtenis_id = Gebeurtenis_tbl.Gebeurtenis_id)" _
& " WHERE Relatie = TRUE" _
& " AND Persoon_id = " & HB_id
Imb.