Another trick is to include carriage returns in SQL statements like this.
strSQL = "SELECT Field1, Field2" & vbCrLf _
& "FROM Table1" & vbCrLf _
& "WHERE Condition1;"
This makes the SQL read far more easily in the immediate window (no long strings of text continuing off the screen) and eliminates the need to put a space before each new statement (like " FROM".
I can't clain credit for the idea (saw it somewhere or another), but it has saved me much aggarvation.
CJ
strSQL = "SELECT Field1, Field2" & vbCrLf _
& "FROM Table1" & vbCrLf _
& "WHERE Condition1;"
This makes the SQL read far more easily in the immediate window (no long strings of text continuing off the screen) and eliminates the need to put a space before each new statement (like " FROM".
I can't clain credit for the idea (saw it somewhere or another), but it has saved me much aggarvation.
CJ