dbTalk Databases Forums  

Merge with Word in A2007

comp.databases.ms-access comp.databases.ms-access


Discuss Merge with Word in A2007 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David-W-Fenton
 
Posts: n/a

Default 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/

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.