G
Guest
Hi
I'm looking to autmate MS Word 2007 from Access 2003 using VBA.
In particular I need to open a document and set the Mail Merge connection.
I'm using:
.....
wdDoc.mailmerge.opendatasource Name:="path to Access database", _
SQLStatement:="SELECT etc. etc."
This works absolutely fine unless the SQL statement is greater than 255
characters. Any SQL statement involving just a couple of Inner Joins is
invariably a lot bigger than 255 characters. Access 2000 used to allow 2 SQL
strings to increase the available size, or a 'connection' parameter to link
to a query in the databse, but these don't seem to be available from Acc2003
onwards.
Anyone have any ideas on how I can use a >255 character SQL statement?
Cheers.
BW
I'm looking to autmate MS Word 2007 from Access 2003 using VBA.
In particular I need to open a document and set the Mail Merge connection.
I'm using:
.....
wdDoc.mailmerge.opendatasource Name:="path to Access database", _
SQLStatement:="SELECT etc. etc."
This works absolutely fine unless the SQL statement is greater than 255
characters. Any SQL statement involving just a couple of Inner Joins is
invariably a lot bigger than 255 characters. Access 2000 used to allow 2 SQL
strings to increase the available size, or a 'connection' parameter to link
to a query in the databse, but these don't seem to be available from Acc2003
onwards.
Anyone have any ideas on how I can use a >255 character SQL statement?
Cheers.
BW