Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot select query in a word mail merge

Status
Not open for further replies.

bertrandr

MIS
Dec 27, 2004
10
US
Hi, Everyone,

I am running a query and then merging it successfully when I use all but two computers in my office. These two computers have been running FileMakerPro to run word merges, and I am assuming that this is somehow related.

Normally the template I want to use is already linked to the query. On these computers, when I select office tools and then merge, I get a prompt box which has me select the table or view I want to merge. The problem is that I am not given the option of selecting the query I need to merge. I am only given table and view objects. I tried making the query into a table and that works, but since we are generating letters frequently, this is not an option.

Any ideas?

Thanks to all out there for reading my post.

Bertie

I don't know if the query has anything to do with it, but here it is:

SELECT Prisoner.CDCNumber, Prisoner.LastName, Prisoner.FirstName, Prisoner.IsCreateMailingLabel, PrisonerContactLog.CaseCode, PrisonerContactLog.PrisonerContactLogID, PrisonerContactLog.InfoReceivedDate, PrisonerContactLog.InfoSource, PrisonerContactLog.PLOStaffIDRecorder, PrisonerContactLog.InfoContentMemo, PrisonerContactLog.FirstRoutetoPLOStaffID, PrisonerContactLog.FirstActionCode, PrisonerContactLog.ResponseBodyMemo, PrisonerContactLog.Signator, PrisonerContactLog.SignatorTitle, PrisonerContactLog.ReplySentDate, PrisonerContactLog.NonStandardEnclosure, Concatenate("SELECT EnclosCode from EnclosureSent where PrisonerContactLogID =" & [PrisonerContactLog.PrisonerContactLogID] & " ORDER BY EnclosCode","; ") AS AllEnclos, PrisonerContactLog.SecondRoutetoPLOStaffID, PrisonerContactLog.SecondActionCode, PrisonerContactLog.SecondActionMemo, PrisonerContactLog.Modifier, PrisonerContactLog.ModifiedDate, PrisonerContactLog.CreationDate, Prisoner.PrisonCode, Prisoner.HousingNumber, Prisoner.HousingType, Prison.POBoxInmate, Prison.City, Prison.State, Prison.PostalCode
FROM Prison INNER JOIN (Prisoner INNER JOIN PrisonerContactLog ON Prisoner.CDCNumber = PrisonerContactLog.CDCNumber) ON Prison.PrisonCode = Prisoner.PrisonCode
WHERE (((PrisonerContactLog.CaseCode)="COL") AND ((PrisonerContactLog.ReplySentDate)=Date()));

 
Hi Again,

I am still not able to create a word template from a query. I have made some progress, but I have to go to a very complicated process to eventually connect to the data in the query. Also I was wrong about the query not working on all but two of the computers in the office. It's not working on most of the computers in the office. We are working on the same operating systems and the same microsoft office, so I cannot understand what might be the problem. I have always used the Access 2000 default version in the latest Access. I am going to try it on the 2003 format.

Here's what happens: When I open up the query, I go to office tools and then merge to an existing document. A word doc opens up, but then a dialogue box appears asking me to select the table. The query is not available for selection. I tried selecting a table from the list even though the selection is wrong. Then I get another dialogue box telling me that certain fields in the main document have fields not in the table selected. I cancel through these prompts and then click browse on the Mail merge wizard. Then I get a find Data Source type dialogue box, select Access mdb file type and then click from My Documents\My Data SOurces folder to the folder on the Network with the database in it. It takes a long time and it is a very buggy process.

IF anyone has had this problem before, I hope to hear from you.

Thanks,

Bertie
 
what if you open the template, connect to the datasource, save the template and then try to open the document as a new document rather than the template?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
Hi, Leslie,

Thank you for responding. I have tried creating the query again and creating new templates, but I haven't tried your suggestion, so I'll give it a try.

I think that I may have stumbled upon a Word mail merge issue. There may be other variables at work here, so I am still identifying the problem. For now I am trying to isolate variables and checking to make sure we are all definitely on the same versions of everything. I also have to check to see which Access version we are using. We are using Access 2003, but we're set at the default 2000 version. This may be an issue as well.

I have also selected "Confirm conversion at open" in Tools\Options under the General Tab for Word 2003 (which is the version we're running). The other problem appears to be related to the type of query I am trying to merge, so I am going back to see which queries contain criteria and/or parameters amd which ones are giving me problems.

In the meantime, I'd still be very appreciative to anyone with any ideas at all.

Thanks,

Bertie

Here are some links that I have found helpful in finding a solution in case others are having the same issue.

 
Hi, Leslie,

Thanks for your advice. We are going from the template to the query instead of accessing the template from within the access query. I had to "reconnect" the templates to the database, but they are all working fine.

I never figured out why it is that on some computers you can access the templates from office tools and others you can't. Some are on the Access 2000 File Format, others are not, some have Confirm conversion at open (in word) selected, and others don't.

In any event,I have found that going to the template first is a lot faster anyway. Fewer clicks and the template is already set to the type you want (ie. letter, directory, etc.)

Thanks,
Bertie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top