A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

retrieve a empty list when using an Access query



 
 
Thread Tools Display Modes
  #1  
Old November 23rd, 2008, 09:21 AM posted to microsoft.public.word.mailmerge.fields
chrisk
external usenet poster
 
Posts: 78
Default retrieve a empty list when using an Access query

Im trying to merge an Access 2003 query result into a Word 2003 doc. If I run
the query in Access i produce a list of results. When I attach the query to
the Word doc the imported table is empty?
  #2  
Old November 23rd, 2008, 05:10 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default retrieve a empty list when using an Access query

You are probably using wildcard characters in a LIKE clause in the Query.
Access only recognises the Jet ones (* and ?) unless the database has been
modified to recognise the ANSI ones (% and _). OLE DB, which Word 203 uses
by default to get the data, only recognises the ANSI ones. If that is the
problem, your options include:
a. connect using DDE, which uses Access to execute the query (check Word
Tools-Options-General-COnfirm conversions at open, then go through the
connection process again and choose the DDE option when it is offered.
b. modify the Access database so the ANSI wildcards are recognised (it's an
option somewhere in access). It's difficult to recommend this because the
change may affect a lot of existing software and you will probably have to
change all the queries.
c. have two versions of each query that uses wildcards - one that uses the
Jet wildcards, the other that uses the ANSI ones, and pick the appropriate
query
d. if the query is shorter than either 255 or 511 characters long (a
limitation in Word), issue the ANSI version of the query in a Word VBA
OpenDataSource call.

Peter Jamieson

"ChrisK" wrote in message
...
Im trying to merge an Access 2003 query result into a Word 2003 doc. If I
run
the query in Access i produce a list of results. When I attach the query
to
the Word doc the imported table is empty?


 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.