- MS Access - Data Export
- MS Access - Data Import
- MS Access - Macros
- MS Access - Built-In Functions
- MS Access - Formatting Reports
- MS Access - Reports Basics
- MS Access - Controls & Properties
- MS Access - Formatting
- MS Access - SQL View
- MS Access - Combo Box
- MS Access - Navigation Form
- MS Access - Modify A Form
- MS Access - Create A Form
- Unmatched Query Wizard
- MS Access - Duplicate Query Wizard
- MS Access - Joins
- MS Access - Summarizing Data
- MS Access - Grouping Data
- MS Access - Indexing
- MS Access - Calculated Expression
- MS Access - Wildcards
- Many-To-Many Relationship
- One-To-Many Relationship
- One-To-One Relationship
- MS Access - Create Relationships
- MS Access - Relating Data
- MS Access - Alternate Criteria
- MS Access - Parameter Queries
- MS Access - Create Queries
- MS Access - Action Queries
- MS Access - Query Criteria
- MS Access - Query Data
- MS Access - Adding Data
- MS Access - Create Tables
- MS Access - Data Types
- MS Access - Create Database
- MS Access - Objects
- MS Access - RDBMS
- MS Access - Overview
- MS Access - Home
MS Access Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MS Access - Create Queries
Let us understand how to create queries in this chapter.
Create an Update Query
You can use an Update Query to change the data in your tables, and you can use an update query to enter criteria to specify which rows should be updated. An update query provides you an opportunity to review the updated data before you perform the update. Let us go to the Create tab again and cpck Query Design.
In the Tables tab, on the Show Table dialog box, double-cpck on the tblEmployees table and then close the dialog box.
On the Design tab, in the Query Type group, cpck Update and double-cpck on the field in which you want to update the value. Let us say we want to update the FirstName of “Rex” to “Max”.
In the Update row of the Design grid, enter the updated value and in Criteria row add the original value which you want to be updated and run the query. This will display the confirmation message.
Cpck Yes and go to Datasheet View and you will see the first record — FirstName is updated to “Max” now.
Create a Delete Query
You can use a delete query to delete data from your tables, and you can use a delete query to enter criteria to specify which rows should be deleted. A Delete Query provides you an opportunity to review the rows that will be deleted before you perform the deletion. Let us go to the Create tab again and cpck Query Design.
In the Tables tab on the Show Table dialog box, double-cpck the tblEmployees table and then close the dialog box.
On the Design tab, in the Query Type group, cpck Delete and double-cpck on the EmployeeID.
In the Criteria row of the Design Grid, type 11. Here we want to delete an employee whose EmployeeID is 11.
Let us now run the query. This query will display the confirmation message.
Cpck Yes and go to your Datasheet View and you will see that the specified employee record is deleted now.
Create a Make Table Query
You can use a make-table query to create a new table from data that is stored in other tables. Let us go to the Create tab again and cpck Query Design.
In the Tables tab, on the Show Table dialog box, double-cpck the tblEmployees table and then close the dialog box.
Select all those fields which you want to copy to another table.
In the Query Type, select the Make Table option button.
You will see the following dialog box. Enter the name of the new table you want to create and cpck OK.
Now run your query.
You will now see the following message.
Cpck Yes and you will see a new table created in the navigation pane.
Advertisements