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.

  • Navigate to the Access database file and double-click it to launch the database in Access.

  • Click the "Queries" option under the "Objects" column on the left side of the screen.

  • Double-click the "Create query in Design view" option in the center of the screen.

  • 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.

  • Double-click the fields that you wish to match in the "Query" window at the top of the screen.

  • 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."

  • Click the "Query" option at the top of the screen, then choose the "Run" command to execute the query.

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.

Related Searches


Promoted By Zergnet


You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!