VB 4198 ... command failed

A

Annette

I started getting this error above ... I have exported and then imported,
but still get the error.

Here's where the code stops responding:

ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `log$` WHERE ((`DateSent` = #" & MyDate & "#))" & ""


The code does bypass the mailmerge top portion:

ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:="\\scotr5s1\csru_reg\SCSU
NPA Log.xls", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
_
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False,
_
Format:=wdOpenFormatAuto, Connection:= _
"DSN=Excel Files;DBQ=\\scotr5s1\csru_reg\SCSU NPA
Log.xls;DriverId=22;MaxBufferSize=2048;PageTimeout=5;" _
, SQLStatement:="SELECT * FROM `log$`", SQLStatement1:=""
 
Top