Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Keith G Hicks Keith G Hicks is offline
external usenet poster
 
Posts: 35
Default merge with Access can't find query

I have a letter I created in Word 2003 a few weeks ago that uses a query
(NOT a Word query, but an Access query) in ms Access 2003 (2k format). This
was working fine a couple of weeks ago. I've changed the query around a bit
to modify how the address is put together. Now when I try to go to Word I
get expected errors (field name changes in the query). So I tried to change
the datasource but it never gives me the opportunity to select a table or a
query. It just assumes the one table I have in the mdb. No otpions come up
at all. So I added a 2nd dummy table to see what would happen. Now a dialog
comes up asking me to choose 1 of the 2 tables. But it doesn't even include
the query at all. Why would it do this? The query runs fine inside ms
Access. How do I correct this problem? I ran a compact/repair on the mdb
just to see if that would fix anything but it didn't help. So I created a
dummy query based on the dummy table and that query does show up in the
list. So there's something about my MS Access query now that MS Word is
throwing up about. I added my primary key to the query output and that
didn't help either. I'm at a loss here. I think Word doesn't like my
functions. If I create a query without the fuctions (like fncCSZ which
simply concatenates city & state & zip with commas and spaces) it notices
the query. Why would it not like the functions? That sort of sucks. Here's
my query:

SELECT tblLawyers.LawyerID, Trim([ContactPrefix] & " " & [ContactFN] & " " &
[ContactMI] & IIf(IsNull([ContactMI]),"",". ") & [ContactLN] & ", Esq.") &
Chr(13) & Chr(10) & IIf(Not IsNull([OfficeName]),[OfficeName] & Chr(13) &
Chr(10),"") & fncStackAddrLines(4,[Addr1],[Addr2],[Addr3],[Addr4]) & Chr(13)
& Chr(10) & fncCSZ([City],[StateCode],[ZipCode]) AS ContactAndOffice,
tblLawyers.ContactFN
FROM tblLawyers
WHERE (((tblLawyers.DontIncludeInMailings)=False))
ORDER BY tblLawyers.ContactLN, tblLawyers.ContactFN;


Thanks,

Keith


Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I cant find an Access query which is a Word data source when I tr. Louise Mailmerge 1 October 23rd 07 08:25 AM
Merge with Access Query rsw Mailmerge 8 June 12th 06 07:01 PM
Mail merge with Access DB does not see a query SarahB Mailmerge 8 November 29th 05 07:18 PM
How do I Mail Merge from an Access Query? geordymac Mailmerge 2 February 9th 05 07:59 AM
mail merge and access query DaveAS Mailmerge 6 January 6th 05 06:33 PM


All times are GMT +1. The time now is 02:31 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"