Hi
I have a complex SQL query, which I need to put into my DB in some VBA code so that it can be dynamically changed.
As far as I know, Access does not have anything like stored procedures, which would have made this easier.
I'm planning to use this SQL query as the record source of a form but to get it neatly into the code I want to leave it in it's exisiting structure with line breaks, etc. for easy reading.
The only way I can think of is to do something like
strSQL = "SELECT Field1, " & _
" Field2, " & _
etc. but this is going to become very tiresome adding the & _ at the end of each line.
Isn't there an easier way ?
I have a complex SQL query, which I need to put into my DB in some VBA code so that it can be dynamically changed.
As far as I know, Access does not have anything like stored procedures, which would have made this easier.
I'm planning to use this SQL query as the record source of a form but to get it neatly into the code I want to leave it in it's exisiting structure with line breaks, etc. for easy reading.
The only way I can think of is to do something like
strSQL = "SELECT Field1, " & _
" Field2, " & _
etc. but this is going to become very tiresome adding the & _ at the end of each line.
Isn't there an easier way ?