
DoCmd.RunSQL too long record
Quote:
> Hello,
> Let's say we have a table with a lot of fields, and field
> names are long.
> When we want to write an SQL (DoCmd.RunSQL "etc")based on
> this table, it can be quite a long record (with no use of
> asterix). That long, that code window can not accept it.
> How to write "Line Feed"? Please help.
You can break the SQL string up into pieces and concatenate them,
using the line-continuation character "_" to put the whole statement
onto multiple lines, like this:
DoCmd.RunSQL _
"SELECT Field1, Field2, " & _
"Field3, Field4, Field5 " & _
"FROM tblMyTable " & _
"WHERE Field1 = 'SomethingOrOther'"
Is that what you were looking for?
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)