Knowledge Base |

# Saving or Opening a Query Also Executes the Query

Article ID: 115792

Article Last Modified on 8/15/2005

APPLIES TO

- Microsoft Excel 95 Standard Edition
- Microsoft Excel 5.0 Standard Edition
- Microsoft Query 2000

This article was previously published under Q115792

## SYMPTOMS

When you save a query in Microsoft Query, the query is first executed, then the query design file is saved. In addition, the query results are always displayed when the query file is reopened (regardless of the setting for Automatic Query on the Records menu).
NOTE: The second paragraph on page 28 of the "Microsoft Query User's Guide" states that the result set will be displayed when the query is opened, unless Automatic Query was off when the query was last saved. Microsoft Query does not behave this way.

## STATUS

Microsoft has confirmed this to be a problem in the products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

## MORE INFORMATION

The query design file saves information that specifies which tables the data should be accessed from. It also specifies which field names are to be retrieved and how they should be displayed. It can save criteria to limit the data that is retrieved. The query file that is saved using the Save Query command on the File menu does not include the data in the result set.
Microsoft Query has an option to Automatically display the result set for the query based on the fields and criteria set in the query window. If this option is toggled off, then dragging a field down to the query window will not automatically execute the query and display the result set. If Automatic Query is turned off, and the query is saved, the query is executed and the result set is shown in the query window. When the query is then reopened, the query is again executed, regardless of the Automatic Query setting.

## REFERENCES

"Microsoft Query User's Guide," version 1.0, pages 26-27

Additional query words: 5.00 5.0 1.0 2.0 definition docerr MSQuery

Keywords: KB115792