Inserting MS Access Query Brings in Extra Fields

Last reviewed: February 5, 1998
Article ID: Q113704

The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a

SYMPTOMS

If you insert data in a Word document from a Microsoft Access database using DDE as the conversion method, Word for Windows inserts all the fields in the query, even though you specify only certain fields. (To insert data, use the Database command on the Insert menu or the Mail Merge feature. To specify fields, choose the Select Fields option in the Query Options dialog box.)

By contrast, this problem does not occur when you insert data using a database table or when you use ODBC for the conversion method.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUNDS

Method 1: Insert the information using an MS Access table for the data

          source, rather than a query. You can then refine the inserted
          information from the database based on both fields and records.
          All the options will be available and usable.

Method 2: Insert the information using an MS Access query for the data
          source. Then delete the unwanted fields by first selecting that
          column in Word and then choosing Delete Column from the Table
          menu.

Method 3: Insert the information using ODBC as the conversion method,
          rather than DDE. To choose ODBC, do the following:

          a. From the Insert menu, choose Database.
          b. Under Data Source, choose the Get Data button.
          c. Select the Confirm Conversions check box.
          d. Open the Microsoft Access database from which you want to
             insert information.
          e. In the Confirm Data Source dialog box, select "MS Access
             Databases via ODBC (*.mdb)."

MORE INFORMATION

Steps to Reproduce the Problem

  1. From the Insert menu, choose Database.

  2. Under Data Source, choose the Get Data button. Select the Confirm Conversions check box. In the List Files Of Type list, select MS Access Databases (*.mdb). Select the Microsoft Access program directory and open the NWIND.MND file. In the Confirm Data Source dialog box, select "MS Access Databases via DDE (*.mdb)."

  3. Microsoft Access will open, and the Microsoft Access dialog box will open. Select the Queries tab, and then double-click Customer List in the queries list box.

  4. In the Database dialog box, select the Query Options button.

  5. Choose the Select Fields tab, and then choose the Remove All button.

  6. Under Fields In Data Source, select Company_Name, then choose the Select button. This will leave just the Customer_Name field in the Selected Fields box. Choose OK.

  7. In the Database dialog box, choose the Insert Data button. In the Insert Data dialog box choose From 1 to 5 (just to limit the amount of data coming in) and select OK.

The expected table should be only one column with just the Company_Name field. The actual result is both of the original query's fields as they were set up in the original query created in Microsoft Access.

REFERENCES

"Microsoft Word User's Guide," version 6.0, pages 624-632, 676-677


KBCategory:
KBSubCategory:
Additional reference words: 6.0 6.0a odbc winword word6
Keywords : kbinterop
Version : 6.0 6.0a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.