Help and Support
 

powered byLive Search

ACC: How to Display an AutoLookup Field in Word Mail Merge

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:187685
Last Review:January 23, 2007
Revision:4.1
This article was previously published under Q187685
Novice: Requires knowledge of the user interface on single-user computers.

On This Page

SYMPTOMS

When a Microsoft Word Mail Merge document displays AutoLookup fields from a table, the fields do not return the AutoLookup values as expected.

Back to the top

CAUSE

Microsoft Word Mail Merge does not use the RowSource property of the table fields to retrieve the lookup values and retrieves the data values of the fields instead.

Back to the top

RESOLUTION

This example uses the sample database Northwind.mdb to demonstrate how to display the AutoLookup values in a Mail Merge document.

Back to the top

Steps to Prepare for the Mail Merge


1.Open the sample database Northwind.mdb, and then open the Orders table in Design view.
2.Select the CustomerID field and, on the Lookup tab, examine the RowSource value. Note that AutoLookup uses the CustomerName field from the Customer table for its lookup value. This reference will be used in step 9.
3.Select the EmployeeID field and, on the Lookup tab, examine the RowSource value. Note that AutoLookup concatenates the LastName and FirstName values from the Employee table for its lookup value. This references will be used in step 10.
4.In the Database window, click the Queries tab, and then click New.
5.In the New Query dialog box, select Design View, and then click OK.
6.In the Show Table dialog box, select Employees, and then click Add.
7.Repeat step 6 for the Orders table and the Customers table, and then click Close.
8.Add all the fields except the CustomerID and EmployeeID fields from the Orders table to the query design grid.
9.Add the CompanyName field from the Customers table to the query design grid.
10.Add the LastName and FirstName fields from the Employees table to the query design grid
11.Save and close the query.

Back to the top

Running the Mail Merge


1.In the Database window, select the query that you created in the "Steps to Prepare for the Mail Merge" section.
2.On the Tools menu, click OfficeLinks. In Microsoft Access 7.0, click Merge It. In Microsoft Access 97, click Merge It With MS Word.
3.In the Microsoft Mail Merge Wizard dialog box, click to select "Create a new document and then link the data to it," and then click OK.

Note that Microsoft Word starts and that a new, blank document is created.
4.In Word, click the Insert Merge Field button. Note that a list of all the fields in the Orders table, the CompanyName field from the Company table, and the LastName and FirstName fields from the Employees table is displayed. Select CompanyName from the list, and then press ENTER.
5.Click the Insert Merge Field button, select LastName from the list, and then press COMMA+SPACEBAR (, ).
6.Click the Insert Merge Field button, select FirstName from the List, and press ENTER.
7.Click the View Merged Data button.

Note that the data presented in the Mail Merge are the same AutoLookup field values that are displayed in the Orders table.

Back to the top

MORE INFORMATION

Steps to Reproduce Behavior

The following example demonstrates what will occur when you include an AutoLookup field from a table in a Mail Merge document.
1.Open the sample database Northwind.mdb and select the Orders table in the Database window.
2.On the Tools menu, click OfficeLinks. In Microsoft Access 95, click Merge It. In Microsoft Access 97 click Merge It With MS Word.
3.In the Microsoft Mail Merge Wizard dialog box, click to select "Create a new document and then link the data to it," and then click OK.

Note that Microsoft Word starts and that a new, blank document is created.
4.In Word, click the Insert Merge Field button. Note that a list of all the fields in the Orders table is displayed. Select CustomerID from the list and press ENTER.
5.Click the Insert Merge Field button and select EmployeeID from the list.
6.Click the View Merged Data button.

Note that the data presented in the Mail Merge is not the AutoLookup field values but is rather the actual EmployeeID and CustomerID values.

Back to the top

REFERENCES

For more information about AutoLookup fields, search the Help Index for "Create a field that looks up or lists values in tables."

Back to the top


APPLIES TO
Microsoft Access 95 Standard Edition
Microsoft Access 97 Standard Edition

Back to the top

Keywords: 
kbprb KB187685

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.