How to Create an Access Query to Match Two Fields
Microsoft Access is a database application that is used to store data in a tabular format. Access is included with several different versions of the Microsoft Office program suite. Data in an Access table is stored in columns that are called "fields" and rows that are called "records." Queries are used to search table data for a specific result or results, based on the criteria you select. With a query, it is possible to search the database for records that match two separate field criteria in the query.
Instructions
-
-
1
Navigate to the Access database file and double-click it to launch the database in Access.
-
2
Click the "Queries" option under the "Objects" column on the left side of the screen.
-
-
3
Double-click the "Create query in Design view" option in the center of the screen.
-
4
Select a table from the "Show Tables" window in the center of the screen, then press the "Add" button. You can also add additional tables from this window to create a multi-table query. Once all tables have been selected, click the "Close" button.
-
5
Double-click the fields that you wish to match in the "Query" window at the top of the screen.
-
6
Type the criteria that you wish to search for into the "Criteria" row for each field. For example, if you have "Name" and "City" fields and are looking for someone named Mike from New York, you would type "="Mike"" into the "Criteria" row under "Name" and "="New York"" into the "Criteria" row under "City."
-
7
Click the "Query" option at the top of the screen, then choose the "Run" command to execute the query.
-
1
Tips & Warnings
It is also possible to create a query to match one field or another field. Simply place the first criterion in the "Criteria" row of the query and the second criterion in the "or" row of the query.