I had created a mail merge using Access and Word that was working fine and then, it seems, all of the suddent I am getting an error "String is longer than 255 characters" at run-time while executing the code below. Clearly the code is longer than 255 characters, but there was no error previously. What could I have changed that caused this? I'm certain the merge worked with a command larger than 255 characters, but now it doesn't.
objWord.MailMerge.OpenDataSource Name:= _
CurrentProject.FullName, LinkToSource:=True, Connection:= _
"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & CurrentProject.FullName & ";Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDBatabase Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB" _
, SQLStatement:="SELECT * FROM [qryStudentMinor] WHERE tblMinor.AdmitDate >= #" & Me!LetterDate & "# AND tblMinor.MinorType= 'General Education'", SQLStatement1:="", _
SubType:=wdMergeSubTypeAccess
objWord.MailMerge.OpenDataSource Name:= _
CurrentProject.FullName, LinkToSource:=True, Connection:= _
"Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" & CurrentProject.FullName & ";Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDBatabase Password="""";Jet OLEDB:Engine Type=5;Jet OLEDB" _
, SQLStatement:="SELECT * FROM [qryStudentMinor] WHERE tblMinor.AdmitDate >= #" & Me!LetterDate & "# AND tblMinor.MinorType= 'General Education'", SQLStatement1:="", _
SubType:=wdMergeSubTypeAccess