Merge with Word in A2007 -
07-26-2011
, 06:55 PM
Someone somewhere raised an issue with this in the last few weeks,
that it doesn't work any longer in A2007. A client of mine reported
the same thing, and I was able to troubleshoot it and figure out
what wasn't working.
First off, the query she was trying to publish had a criterion in it
with LIKE and a wildcard, e.g., LIKE "Fent*".
Secondly, the symptom was that the merge would set up in Word but
never return any records.
Googling a bit, I discovered that Word 2007 uses OLEDB for its data
access by default (without giving you a choice in the wizard that I
could see), so that means that the connection Word is using needs
ANSI 92 wildcards, e.g., % or _ (instead of * and ?).
You can't change the query in Access to use ANSI 92 wildcards,
because then it won't run in Access (unless you change to ANSI 92
SQL mode, which has very bad side effects and is not advisable at
all). But if you can change the query to use the ALIKE operator, you
can use the SQL 92 wildcard, e.g., ALIKE "Fent%", and it will run in
both Access and when executed via OLEDB from Word.
I have no idea why MS would break this in this way by defaulting to
OLEDB as the access method when they have to know it is going to
break a certain number of already-working queries.
--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/ |