Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.
Use a screen reader to create a query in Access desktop databases

This article is for people with visual or cognitive impairments who use a screen reader program such as Windows Narrator, JAWS, or NVDA with Microsoft 365 products. This article is part of the Microsoft 365 screen reader support content set where you can find more accessibility information on our apps. For general help, visit Microsoft Support.

Use Access with your keyboard and a screen reader to create a query. We have tested it with Narrator, JAWS, and NVDA, but it might work with other screen readers as long as they follow common accessibility standards and techniques.

A query makes it easier to view, add, delete, or change data in your Access desktop database. Queries are also useful when you want to find specific data quickly, calculate or summarize data, or automate data management tasks, such as reviewing the most current data on a recurring basis.

Notes: 

In this topic

Types of queries

In a well-designed database, the data that you want to present through a form or report is usually located in multiple tables. A query pulls the information from various tables and assembles it for display in a form or report. There are two major types of queries, a select query and an action query. The type of query you create depends on the task you want to perform.

Select queries

A select query is a request for data results. A select query helps you get just the data you need in a Datasheet view. Use a select query to do the following:

  • Review data from only certain fields in a table

  • Review data from several related tables simultaneously

  • Review data based on certain criteria

  • Make calculations

  • Combine data from different tables

For example, if a Product table has multiple fields (columns), you can create a select query to get an uncluttered view that focuses on just the fields (columns) you need. You can also add criteria to filter the number of rows returned, so that, for example, only rows containing products costing more than $10.00 are returned.

Action queries

An action query is a request for action on the data. Use an action query to add, change, or delete data from your database. Each task, such as adding or deleting data, has a specific type of action query.

Create a select query

To perform a simple query, use the Query Wizard. To add criteria to your query, use the Query Designer.

Use the Query Wizard

  1. Press Alt+C, Q, Z. The New Query window opens, with the Simple query wizard selected.

    Tips: 

    • If you haven’t yet saved the table you want to create a query for, you will be prompted to do so before the Query Wizard opens.

    • You can also use the Query Wizard to create other types of queries: Crosstab Query, Find Duplicates Query to find records with duplicate field values in a single table, and Find Unmatched Query to find records (rows) in one table that have no related records in another table.

  2. Press Enter. The Simple Query window opens, with the focus on the Available fields list box.

  3. To move to the Tables/Queries edit combo box, press Alt+T or Shift+Tab.

  4. To open a dropdown list, press Alt+Down arrow key. On the dropdown list, to select the table you want to run the query on, use the Up and Down arrow keys.

  5. To move to the Available fields list box, press the Tab key. To select the field you want to run the query on, use the Down arrow key.

  6. To add the field to your query, press Alt+S. The focus moves to the Selected fields list box.

  7. Press the Tab key until you hear “Greater than button,” and then press Enter.

  8. If you want to add all the fields, press Alt+S and then press the Tab key until you hear: “Greater than button.” Press the Tab key once. With Narrator and NVDA, you hear: "Button." With JAWS, you hear: “Double right arrow button.” Press Enter to select.

  9. To add more tables to your query, press Alt+T. The focus moves to the Tables/Queries edit field. Repeat steps 4–9 as needed.

  10. When you have finished entering all your tables and fields, to move to the next wizard page, press Alt+N.

    Tip: Depending on the information you entered, the next wizard pages might vary. For example, you might be asked to select a detail or summary version of your query. Make your selection and, to move to the next wizard page, press Alt+N.

  11. On the new wizard page, you hear: “What title do you want for your query?” Press Shift+Tab. The focus moves to the Title edit field. Type a name for the query.

  12. Check, modify, and save your query.

    • To save the query and open it to review the information, press Alt+O, and then press Enter. To close the query, press F6.

    • To save the query and exit the wizard without displaying the query results, press Alt+F, S. When the wizard closes, the query appears on a new tab, with the focus in the first cell.

    • To modify the design of the query, press Alt+M, and then press Enter. The query opens in the Design view.

Use the Query Designer

  1. Press Alt+C, Q, D. The Show Table dialog box opens with the Tables tab selected, and you hear: “Show table dialog.”

  2. In the Show Table dialog box, to select a table and add it to the query, use the Down arrow key, and then press Alt+A when you hear the name of the table you want. The table is pasted in the workspace, above the design grid.

  3. To close the Show Table dialog box, press Alt+C.

  4. The focus is in the design grid, in the Field row edit box. With Narrator and NVDA, you hear: “Access, Row one, Column one.” With JAWS, you hear: “Design, Autonumber, type and text.” To add a field to the design grid, press Alt+Down arrow key. A dropdown list of available fields opens.

  5. To move to the dropdown list with JAWS, press Ctrl+Up arrow key. With Narrator, the focus moves automatically to the dropdown list.

  6. To select a field from the dropdown list, press the Down arrow key until you hear the name of the field you want, and then press Enter to select. The field you selected appears in the column. The focus automatically moves to the next column.

  7. To add another field to your query, repeat steps 4–6.

  8. To add a criterion to a field:

    1. With Narrator and NVDA, in the column of the field you want to add a criterion to, press the Down arrow key until you hear: “Row 11, Column 1.” With JAWS, press the Down arrow key until you hear: “Criteria.”

    2. Enter a criterion. For example, for a Price field on a Products table, type the right angle bracket, equals symbol, and the number 10 (>=10) to show a list of products with a price greater than or equal to $10.00.

  9. To display the query results, press Alt+J, Q, G.

  10. To save your query, press Ctrl+S. In the Save as dialog box, enter a name for your query, and then press Enter.

Note: You can use Query Designer to simultaneously review data from multiple related tables. For example, if you have a database with a Customers table and an Orders table, and each table has a Customer ID field, which forms the basis of a one-to-many relationship between the two tables, you can create a query that returns orders for customers in a particular city. To create a query that simultaneously reviews data from multiple tables, use the procedure listed here, but repeat steps 2 through 8 to add additional tables, fields, and criteria to the query.

Create a parameter query

If you frequently run variations of a particular query, consider using a parameter query. When you run a parameter query, the query prompts you for field values and then uses the values that you supply to create criteria for your query.

  1. In the Navigation pane, select the query you want to base your parameter query on.

  2. Press Shift+F10. The context menu opens.

  3. Press D. The query opens in Design view, with the focus in the first row of the first field in the query design grid.

  4. To move to the field you want to modify, press the Right arrow key until you hear the name of the field you want.

  5. To move to the Criteria row, with Narrator and NVDA, press the Down arrow key until you hear: “Row 11, Column 1.” With JAWS, press the Down arrow key until you hear: “Criteria.”

  6. In the cell, delete any existing information and enter a parameter string. For example, if you want to create a parameter query for a query to find customers in New York, delete “New York” and enter For what city?. You cannot use a period (.) or an exclamation point (!) as text in a parameter prompt. The string For what city? is your parameter prompt. The brackets indicate that you want the query to ask for input, and the text (in this case, For what city?) is the question that the parameter prompt displays.

  7. To run the query, press Alt+J, Q, G. The Enter parameter value window opens, with the focus in the edit field. Enter a value, for example, New York.

  8. Press the Tab key until you reach the OK button, and then press Enter. In this example, orders for customers in New York appear.

Specify parameter data types

You can also specify what type of data a parameter should accept. You can set the data type for any parameter, but it is especially important to set the data type for numeric, currency, or date/time data. When you specify the data type that a parameter should accept, users get a more helpful error message if they enter the wrong type of data, such as text when currency is expected.

Note: If a parameter is set to accept text data, any input is interpreted as text, and no error message is displayed.

  1. Open the parameter query. To switch to Design view, press Alt+H, W, D. The design grid opens.

  2. Press Alt+J, Q, S, P. The Query Parameters dialog box opens, with the focus in the Parameter column.

  3. Type the prompt for each parameter for which you want to specify the data type. Make sure that each parameter matches the prompt that you use in the Criteria row of the query design grid. For example, if you entered For what city?, you would enter that same prompt in the Query Parameters dialog box.

  4. To move to the Data Type column, press the Tab key.

  5. To open a dropdown list, press Alt+Down arrow key.

  6. To select the data type for a parameter, press the Down arrow key until you hear the one you want.

  7. To save and exit the dialog box, press Enter.

For more information about using parameters, go to use parameters to ask for input when running a query.

Create a crosstab query

When you want to restructure summary data to make it easier to read and understand, use a crosstab query. A crosstab query calculates a sum, average, or other aggregate function, and then groups the results by two sets of values—one down the side of the datasheet and the other across the top. You can use the Query Wizard to quickly create a crosstab query.

The Crosstab Query Wizard makes you choose a single table or query as the record source for your crosstab query. If a single table does not have all the data you want to include in your crosstab query, start by creating a select query that returns the data you want.

  1. Press Alt+C, Q, Z. The New Query dialog box opens, with the Simple query wizard selected.

    Tip: If you haven’t yet saved the table you want to create a query for, you will be prompted to do so before the Query Wizard opens.

  2. Press the Down arrow key. You hear: “Crosstab Query Wizard.”

  3. Press Enter or Alt+N. The Crosstab Query Wizard opens with the Tables radio button selected and the focus in the Tables list box.

  4. Select the objects you want to use to create a crosstab query:

    • To select a table, use the Down arrow key.

    • To select a query, press Alt+Q. Press Shift+Tab to move to the list box. To select a query, press the Down arrow key until you hear the name of the query you want.

    • To select both tables and queries, press Alt+O. Press Shift+Tab to move to the list box. To select the tables and queries you want, press the Down arrow key until you hear the ones you want.

  5. To move to the next page, press Enter or Alt+N.

  6. The next page opens with the focus in the Available fields list box. To select the field that contains the values you want to use as row headings, press the Down arrow key.

  7. To add the selected field, press the Tab key, and then press Enter. Repeat this for each field you want to add.

    Tips: 

    • You can select up to three fields to use as row headings sources, but the fewer row headings you use, the easier your crosstab datasheet will be to read.

    • If you choose more than one field to supply row headings, the order in which you choose the fields determines the default order in which your results are sorted.

  8. To move to the next wizard page, press Enter or Alt+N.

  9. To select the field that contains the values you want to use as column headings, press the Down arrow key until you hear the field you want.

    Tip: In general, you should choose a field that contains few values, to help keep your results easy to read. For example, using a field that has only a few possible values (such as gender) might be preferable to using a field that can contain many different values (such as age).

  10. If the field you choose to use for column headings has the Date/Time data type, the wizard adds a step that lets you group the dates into intervals. You can specify Year, Quarter, Month, Date, or Date/Time. If you do not choose a Date/Time field for column headings, the wizard skips this page.

  11. To move to the next page, press Enter or Alt+N. When the page opens, the first field is selected in the Fields list box, and the focus is in the Functions list box.

  12. To move to the Fields list box, to select a different field, press Shift+Tab. With Narrator and NVDA, you hear: “Fields, selected.” With JAWS, you hear “Fields, colon, list box,” and the name of the first field.

  13. To select a field, use the Down arrow key.

  14. To move to the Functions list box, press the Tab key. With Narrator and NVDA, you hear: “Functions, selected.” With JAWS, you hear “Functions, colon, list box,” and the name of the first function.

  15. To select a function to use to calculate summary values, use the Down arrow key. The data type of the field selected determines which functions are available.

  16. When you have finished making your selections, press the Tab key until you reach the Yes, include row sums checkbox. Press Spacebar to select or clear it. If you include row sums, the crosstab query has an additional row heading that uses the same field and function as the field value. Including a row sum inserts an additional column that summarizes the remaining columns. For example, if your crosstab query calculates average age by location and gender (with gender column headings), the additional column calculates the average age by location, across all genders.

    Tip: You can change the function that is used to produce row sums by editing the crosstab query in the Design view.

  17. To move to the next wizard page, press Enter or Alt+N.

  18. To name your query, press Shift+Tab and then enter a name. The default name contains an underscore followed by the suffix “crosstab.”

  19. Review, modify, and save the query.

    • To review the crosstab query, press Enter.

    • To modify the query design, press Alt+M, and then press Enter.

    • To save the query and exit the wizard, press Alt+F.

Create a delete query

When you want to simultaneously remove entire records (rows) from a table or from two related tables, use a delete query. A delete query is useful because it lets you specify criteria to quickly find and delete the data. It can also save you time, because you can reuse a saved query.

Notes: 

  • Before you delete any data or run a delete query, make sure that you have a backup of your Access desktop database. A delete query gives you an opportunity to review the rows that will be deleted before you perform the deletion.

  • If you want to delete only a few records, you don’t need a query. Just open the table in Datasheet view, select the fields (columns) or records (rows) you want to delete, and then press Delete. You will be asked to confirm the permanent deletion.

Create a delete query to delete all empty rows in a table or field

  1. Press Alt+C, Q, D. The Show Table dialog box opens.

  2. To select a table, press the Down arrow key until you hear the name of the table you want. Press Alt+A. Repeat this for each table you want to delete records from.

  3. To close the Show Table dialog box, press Alt+C. The table appears as a window in the upper-left section of the query design grid, with all the fields listed.

  4. Press Alt+J, Q, X. The design grid opens, with the focus in the first field. In the design grid, the Sort and Show rows are no longer available, but the Delete row is now available.

  5. Press Alt+Down arrow key to open the dropdown list.

  6. Press the Down arrow key until you hear the field you want, and then press Enter. The focus moves to the next column.

  7. To move to the previous column, press the Left arrow key.

  8. To move to the Delete row, press the Down arrow key until you hear “Delete colon,” and then press Alt+Down arrow key to open a dropdown list.

  9. To select “Where,” press the Up arrow key, and then press Enter. The focus moves to the next column.

  10. To move to the previous column, press the Left arrow key.

  11. To move to the Criteria row, press the Down arrow key.

  12. When you hear “Criteria” or “Row 11, Column 1,” enter IsNull(true).

  13. To verify that the query returns the records you want to delete, press Alt+H, W, H.

  14. To run the query:

    1. To switch to the Design view, press Alt+H, W, D.

    2. In the Design view, press Alt+J, Q, G. A confirmation window opens, asking you to confirm the deletion of rows.

    3. To delete the rows, press Enter.

  15. To save the query, press Ctrl+S. In the Save as dialog box, type a name, and then press Enter.

Create a delete query with specific criteria

  1. Press Alt+C, Q, D. The Show Table dialog box opens.

  2. To select a table, press the Down arrow key until you hear the name of the table you want. Press Alt+A. Repeat this for each table you want to delete records from.

  3. To close the Show Table dialog box, press Alt+C. The table appears as a window in the upper-left section of the query design grid, with all the fields listed.

  4. Press Alt+J, Q, X. The design grid opens, with the focus in the first field. In the design grid, the Sort and Show rows are no longer available, but the Delete row is now available.

  5. Press Alt+Down arrow key to open the dropdown list.

  6. To select the field with the criteria you want for deletion, press the Down arrow key until you hear the field you want, and then press Enter.

  7. To move to the Delete row, press the Down arrow key. Press Alt+Down arrow key and then, to select “Where,” press the Down arrow key, and then press Enter. The focus moves to the next column.

  8. To move to the previous column, press the Left arrow key.

  9. To move to the Criteria row, press the Down arrow key.

  10. Enter your criteria. For a sample list of criteria in queries, refer to Create and run a delete query.

  11. To move to the Show row, press the Up arrow key.

  12. Press Spacebar to clear the Show checkbox for each criterion.

  13. To verify that the query returns the records you want to delete, press Alt+H, W, H.

  14. To run the query:

    1. To switch to the Design view, press Alt+H, W, D.

    2. In the Design view, press Alt+J, Q, G. A confirmation window opens, asking you to confirm the deletion of X number of rows.

    3. To delete the rows, press Enter.

  15. To save the query, press Ctrl+S. In the Save as dialog box, type a name, and then press Enter.

Back up your database

  1. Press Alt+F, A. The Save as pane opens, with Save Database As selected.

  2. To back up the database, press B, and then press Enter. The Save as dialog box opens, with the File name text box selected. If you want, type a new name for the database, and then press Enter.

If you are using a read-only file or a database created in an earlier version of Access, you might get a message that it is not possible to create a backup of the database.

Revert to a backup

  1. Close and rename the original file so that the backup copy can use the name of the original version.

  2. Assign the name of the original version to the backup copy.

  3. Open the renamed backup copy in Access.

See also

Use a screen reader to start Access

Keyboard shortcuts for Access

Set up your device to work with accessibility in Microsoft 365

Technical support for customers with disabilities

Microsoft wants to provide the best possible experience for all our customers. If you have a disability or questions related to accessibility, please contact the Microsoft Disability Answer Desk for technical assistance. The Disability Answer Desk support team is trained in using many popular assistive technologies and can offer assistance in English, Spanish, French, and American Sign Language. Please go to the Microsoft Disability Answer Desk site to find out the contact details for your region.

If you are a government, commercial, or enterprise user, please contact the enterprise Disability Answer Desk.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Find solutions to common problems or get help from a support agent.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×