SallyJenkins
Registered User.
- Local time
- Yesterday, 18:28
- Joined
- Nov 2, 2012
- Messages
- 13
I am using MS Access 2012 (MDB). My understanding is that my sqlstatement can be as long as 32,000 + characters. When in debug mode I can see the sql string and when longer the 256 chars it is cut off. Is there some secret switch I need to set to accept longer strings? Also I was getting an error message (sorry can't remember what it was).
This code is just a sample so you can see how I write the sql code. I had to remove the table name from this so it would be under 256 chars.
This code is just a sample so you can see how I write the sql code. I had to remove the table name from this so it would be under 256 chars.
Code:
SQL = "SELECT GrantAmt, GrantDate, Action, FundId, payee_name INTO EndowGrants " & _
"FROM FOUND_sql_Grants " & _
"WHERE (GrantAmt > 0) AND (Action = 'A') AND (FundId > '19999' And FundId < '30000') " & _
"AND (GrantDate between #" & dtBeginFyDate & "# and #" & dtEndDate & "#) "
DoCmd.RunSQL SQL
Last edited: