- Local time
- Today, 10:06
- Joined
- Feb 28, 2001
- Messages
- 30,870
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:
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.
Your method is equally as valid as any other method since the underscore (continuation) and ampersand (concatenation) are considered as independent operators. They can appear in either order, so... whatever floats your boat.