Monday, February 8, 2010

Using Access parameter queries in Word 2003 Mail Merge

You must have notices that by default you cannot select parameter queries as as a data source in Word 2003. This is because the default settings have been changed in Word 2003. The solution to this is to change the default setting under Tools > Options > General in Word 2003.


What is a Parameter Query?


A parameter query is one in which the value of one of the fields in the query is entered at run time in order to filter the data rows returned. i.e. If in a company there are several departments and we create a query of the employee details, we can filter the query by the department of the employee. So, here the department becomes the parameter. If we wish to send a mailer to all the employees of the marketing department, we enter marketing when access displays the prompt to enter department at the time of opening the mail merge document.


Solution To The Word 2003 Mail Merge Parameter Query Problem


Create a mail merge document as usual. We are assuming that we will be using the open document as the mail merge document.
First we have to change the settings. Under Word 2003 Menus, Go to Tools > Options > General
Here under the general tab, click the check box Confirm conversion at Open as shown in the screenshot below.

Settings Required in word 2003 to use access parameter queries

Click OK and exit the tools menu.
Next click open data source on the mail merge menu. Browse to the required database and select it. When the confirm data source dialog box appears, select MS Access Databases via DDE (*.mdb;*.mde) and click OK. ( See the Screenshot below)
Settings Required in word 2003 to use access parameter queries

The list of tables as well as queries in the selected database will then be displayed to you. Here select the required parameter query as your data source.
Full in depth coverage of the nature of this problem including how to reproduce it as well as the solution is given in Word 2003 Mail Merge stops responding with Word was unable to open the data source



Related Access Tutorial - Refreshing Linked Tables


In case you are using Access over the network and have changed the location of the backend database, you will also have to refresh the linked tables. Details of this procedure are given in Refreshing Linked tables in Access

No comments: