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  

Mailmerge returns zero records



 
 
Thread Tools Display Modes
  #1  
Old January 27th, 2010, 05:24 PM posted to microsoft.public.word.mailmerge.fields
Sue Sweet
external usenet poster
 
Posts: 20
Default Mailmerge returns zero records

I am using Office2003 and am trying to do a mailmerge using an Access query
as my data list. I filter my query, save & close the query, open my main
document and each time it makes me open the data source and choose the query.
But then no records are returned. I can't figure out if the problem is with
Word or the Access database.

Hope someone can shed some light!!

Thanks

Sue
  #2  
Old January 28th, 2010, 12:17 AM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Mailmerge returns zero records

1. As far as getting the query to return records is concerned, the
chances are that you are using a filter that uses wildcards (in SQL,
something along the lines of

SELECT * FROM mytable WHERE myfield LIKE "abc*"

There are two sets of Wildcards. Access normally uses "*" for "any
character string" and "?" for a single character, but the current SQL
standards, and the OLE DB provider that Word uses to get data from
Access/Jet, require "%" for "any character string" and "_" for a single
character.

If you can edit the SQL of your query directly in Access so that it uses
% instead of * and _ instead of ?, you may find that Word suddenly
"sees" the records you expect. Hoever, it may be better to maintain two
versions of the same query becaue other software may insist on the "*"
and "?"

Another possibility (but apparently increasingly difficult in Word
2007), is to change the way Word connects to Access to DDE instead of
OLE DB. If you really want to do that, in Word 2007, check Office
button-Word options-Advanced-Confirm file format conversion on open
(near the bottom), go through the connection process again, and you
should see an additional Confirm Data Source dialog box. If you see an
entry like "MS Access databases via DDE", select it. If you only see
"OLE DB database files" (typically if you are using a .accdb rather than
a .mdb source), check Show all, then locate and select that DDE option,
and continue. In Word 2003, the option has a similar name under
Tools-Options-General.

2. As far as the constant question about connection is concerned, I
suggest you disconnect the data source from your document (set the type
of the Mail Merge Main Document to "Normal Word Document instead of
Letters,Directory, etc.) , save the document, re-open it and try again.

Peter Jamieson

http://tips.pjmsn.me.uk

On 27/01/2010 16:24, Sue Sweet wrote:
I am using Office2003 and am trying to do a mailmerge using an Access query
as my data list. I filter my query, save& close the query, open my main
document and each time it makes me open the data source and choose the query.
But then no records are returned. I can't figure out if the problem is with
Word or the Access database.

Hope someone can shed some light!!

Thanks

Sue

 




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 04:57 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.