![]() |
|
#1
|
||||
|
||||
![]()
The problem is most likely in the SQL statement. looking at it again, I suspect the itype & isubresp string variables need to be quoted. Try changing StrSQL to:
Code:
StrSQL As String = "SELECT * FROM [CORE$] WHERE [TYPE]=""" & itype & """ AND [SIG_CREW]= """ & isubresp & """" & _ " ORDER BY [START] ASC, [COMPLEX] ASC, [UNIT] ASC"
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
So, unfortunately this last suggestion still resulted in the command failed error.
In an attempt to troubleshoot, I broke apart the Code:
.OpenDataSource Name:=StrSrc, AddToRecentFiles:=False, LinkToSource:=False, ConfirmConversions:=False, _ ReadOnly:=True, Format:=wdOpenFormatAuto , Connection:="Provider=Microsoft.ACE.OLEDB.12.0;" & _ "User ID=Admin;Data Source=" & StrSrc & ";Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";", _ SQLStatement:=StrSQL, SQLStatement1:="", SubType:=wdMergeSubTypeAccess .Execute Pause:=False Up until then, the select table dialogue allowed me to select CORE as the datasource. The report populated (maybe prematurely) as it pumped out a page of 135 calculation errors. (ouch!). None of the mailmerge fields in the header or footer populated. But ... one problem a time! |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sharing data between Office applications | mdavies | Office | 1 | 11-26-2013 02:55 PM |
![]() |
abreeden | Office | 1 | 05-18-2012 08:02 PM |
![]() |
RiverStyx | Office | 1 | 05-30-2011 08:31 PM |
Change skin color of applications? | Jack R | Office | 0 | 07-04-2010 04:25 AM |
How many Word applications are running GetObject | stevecarr | Word | 0 | 01-09-2006 07:41 AM |