I can't seem to remember how to wrap a long sql statement. I am using DoCmd.RunSQL and sql cut and pasted from a query, but the line is too long. I seem to remember a way to effectively wrap this with underscores and ampersands, but it's not working. Help!
To do it in the middle of a string use both ampersands and underscores like so:
DoCmd.RunSQL "SELECT * FROM tblGenericName " & _
"WHERE intA > intB"
Close off the first line with end quotes, use the ampersand to concantenate the strings and the underscore continues the same line of code...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.