Saving Queries
A query doesn't store data - it just pulls data out of tables and puts it in query datasheets for you to look at. A query is dynamic - as you add to or change your data, the result of the query also changes. When you save your query, you're not saving the table that the query produces - you're just saving the query design so you can ask the same question again.
You don't have to save a query. Often you create queries on the fly to answer a question. No need to clutter your database with queries you're unlikely to need again.
That said, you can certainly save a query design when you need to. Use one of the following methods:
- In Design or Datasheet view, click the Save button or press Ctrl+S. If you haven't saved the query yet, Access asks you for a name for the query. Type the name in the Save As dialog box and then click OK.
- Close the query (clicking the Close button is a popular method). If you've never saved the query, or if you've changed the query design since you last saved it, Access asks whether you want to save the query. Click the Yes button to save the query. If you've never saved the query, give it a name in the Save As dialog box and click OK.
Give your new query a name that tells you what the query does. That way, you won't have to open one query after another to find the one you're looking for. If you want to create a query similar to one you already have in your database, select or open the query and choose Save As from the File menu (click the icon in the top-left corner of the Access window to display the File menu) to save the query with a new name. You keep the original query and make changes to the new copy.
If you want to save the query dynaset, create a snapshot query with the data or export the data to its own file, using one or more buttons in the Export group of the External Data tab on the Ribbon.
In this tutorial:
- Creating Select Queries
- Types of Queries
- Creating a Query in Design View
- Creating a Query with the Simple Query Wizard
- Viewing Your Query
- Tips for Creating a Query
- Editing a Query
- Sorting a query
- Changing the format of a query field
- Limiting Records with Criteria Expressions
- Using dates, times, text, and values in criteria
- Using multiple criteria
- Using lookup fields in criteria
- Working with Multiple Related Tables
- Working with Query Datasheets
- Saving Queries