Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I cant find an Access query which is a Word data source when I tr. | Mailmerge | |||
Merge with Access Query | Mailmerge | |||
Mail merge with Access DB does not see a query | Mailmerge | |||
How do I Mail Merge from an Access Query? | Mailmerge | |||
mail merge and access query | Mailmerge |