MS Query Button Doesn't Appear in Open Data Source Dialog Box

Last reviewed: September 16, 1996
Article ID: Q126556
The information in this article applies to:
  • Microsoft Office for Windows 95, version 7.0
  • Microsoft Office for Windows, version 4.0, 4.2, 4.3
  • Microsoft Office for Windows NT, version 4.2
  • Microsoft Word for Windows 95, version 7.0
  • Microsoft Word for Windows, version 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0

SYMPTOMS

In Microsoft Word, when you use the Open Data Source dialog box in either Mail Merge Helper or Insert Database, the MS Query button may not appear, even if Microsoft Query is installed on your computer.

CAUSE

Microsoft Word for Windows 95

Normally, the MS Query button appears in the Open Data Source dialog box if Microsoft Query is installed on your computer. However, the MS Query button does not appear in the Open Data Source dialog box if Microsoft Query is not registered in the Windows Registry.

Microsoft Word for Windows

The MS Query button does not appear, even if Microsoft Query is installed on your computer, when the [Extensions] section of your WIN.INI file does not contain a line that associates .QRY extensions with the Microsoft Query application.

Note that if this line is missing, the MS Query button appears in the Open Data Source dialog box after you run Microsoft Query during the current session of Microsoft Word. However, when you close and then restart Word, the MS Query button does not appear.

Microsoft Word for Windows NT

The MS Query button does not appear in the Open Data Source dialog box if Microsoft Query is not registered in the Windows NT Registry. Microsoft Query should be registered in the Extension folder under HKey_Current_User on Local Machine.

WORKAROUNDS

To correct this problem, use the appropriate method below.

Microsoft Word for Windows 95

To restore the registry entry for Microsoft Query, you can run the Setup program for the program that installed Microsoft Query (either Office or Microsoft Excel) using the /y switch by doing the following:

  1. On the Start menu, click Run, and type the following

          <path>Setup /y
    

    where <path> is the path to your Microsoft Excel or Office Setup program.

    Setup starts in maintenance mode.

  2. Click the Reinstall button.

Instead of copying files, Setup immediately begins registering the program components again.

Microsoft Word for Windows

  1. In a text editor, such as Notepad, open your WIN.INI file (located in your Microsoft Windows directory).

  2. Locate the [Extensions] section, and enter the following line:

          qry=C:\WINDOWS\MSAPPS\MSQUERY\msquery.exe ^.qry
    

    where C:\WINDOWS is your Microsoft Windows directory. Note that there must be a space before the caret character (^).

  3. Close the WIN.INI file and save the changes.

Microsoft Word for Windows NT

  1. In Program Manager, choose Run from the File menu. In the Command Line box, type "REGEDT32" (without the quotation marks), and choose OK.

  2. In the Windows NT Registry, choose "HKEY_CURRENT_USER on Local Machine" from the Window menu.

  3. Double-click the Software subfolder. Double-click the Microsoft subfolder. Double-click the Windows NT subfolder. Double-click the Current Version folder. Single-click the Extension folder.

  4. From the Edit menu, choose Add Value.

  5. In the Value Name box, type "qry" (without the quotation marks). From the Data Type list, select REG_SZ. Choose OK.

  6. In the String box, enter the following

          c:\winnt35\msapps\msquery\msquery.exe ^.qry
    

    where c:\winnt35 is your Microsoft Windows NT directory. Note that there must be a space before the caret character (^) in this line.

  7. Choose OK. From the Registry menu, and choose Exit to close the Registry Editor.

  8. Start Microsoft Word again.

Note that both of these workarounds add MS Query Files (*.qry) to the List Files Of Type list in the Open Data Source dialog box.

MORE INFORMATION

Microsoft Query is an ODBC-supported, data access application that is shipped with Microsoft Office (versions 4.0 and later) and Microsoft Excel (versions 5.0 and later). You can run Microsoft Query by itself, or use Microsoft Query from within Microsoft Excel or Microsoft Word.

In Microsoft Word, you can run Microsoft Query by choosing the MS Query button in the Open Data Source dialog box. To display the Open Data Source dialog box, do either of the following:

  • Choose Database from the Insert menu, and then choose the Get Data button.

    -or-

  • From the Tools menu, choose Mail Merge. Choose the Get Data button (assuming that you have already created a main document), and then select Open Data Source.


KBCategory: kbinterop
KBSubcategory: xlquery offwin

Additional reference words: 4.00 4.20 4.20c 4.30 4.30c 5.00 5.00c 6.00
6.00a 6.00c 7.00 word6 msquery query unavailable




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: September 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.