By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,823 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Auto SQL editor

P: n/a
wak
Hello,

I'm using MS Access 2003 for a software program I'm creating. The
program makes use of some complicated queries that I'm storing inside
the Access database.

Access keeps rearranging the lines and spacing inside the SQL queries,
making it difficult to go back and edit them. How can I turn off this
annoying "feature" so that new lines and whitespace characters are
left alone?

Thanks.

--
Winston Kotzan
Dec 27 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can't turn this off. If you store them as queries in Access, it will
modify the SQL statement whenever you alter the query in design view, and it
will handle its own line endings even when you save it in SQL View.

Perhaps you could save your queries in the Memo field of a Table instead of
in the query window. You can then grab the text from the table and run it in
code, or assign it to the SQL property of a temporary QueryDef set up for
the purpose. Example:
strSql = DLookup("MyMemoField", "MyTable", "ID = 99")
CurrentDb.QueryDefs("MyTempQuery").SQL = strSql

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<wa*@wakproductions.comwrote in message
news:6e**********************************@l32g2000 hse.googlegroups.com...
Hello,

I'm using MS Access 2003 for a software program I'm creating. The
program makes use of some complicated queries that I'm storing inside
the Access database.

Access keeps rearranging the lines and spacing inside the SQL queries,
making it difficult to go back and edit them. How can I turn off this
annoying "feature" so that new lines and whitespace characters are
left alone?

Thanks.

--
Winston Kotzan
Dec 27 '07 #2

P: n/a
wak
Thanks for the reply.
Dec 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.