Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

MS Access queries the data


May 16, 2021 MS Access


Table of contents


A query is a request for the results of the data and an operation on the data. You can use queries to answer simple questions, perform calculations, combine data from different tables, or even add, change, or delete table data.

  • As table sizes grow, they can have hundreds of thousands of records, making it impossible for users to pick specific records from the table.

  • With queries, you can apply filters to the table's data so that you get only the information you need.

  • A query that retrieves data from a table or performs calculations is called a selection query.

  • A query that adds, changes, or deletes data is called an action query.

  • You can also use queries to provide data for a form or report.

  • In a well-designed database, the data to be displayed using a form or report is typically in several different tables.

  • The tricky part of queries is that you have to understand how to build one before you can actually use it.

Create a selection query

You can use selection queries if you want to view only data for certain fields in a table, or for data in multiple tables at the same time, or only for databases based on certain criteria. ab. pen the database, and then click create a tab.

MS Access queries the data

Click to query the design.

MS Access queries the data

In the Display Table dialog box in the Table tab, double-click the tblEmployees table, and then click the Close dialog box.

MS Access queries the data

In the tblEmployees table, double-click on all the query result fields you want to see. Add these fields to the query design grid, as shown in the following screenshot.

MS Access queries the data

Now click Run on the Design tab, and then click Run.

MS Access queries the data

The query runs and displays only the data in those fields specified in the query.