Microsoft Access or MS Access is a database management system from Microsoft and comes as a part of Microsoft Office suite. MS Access is used to store information in the form of tables with rows separated into columns under different fields. To retrieve information from the database tables, MS access uses structured Query Languages. Simply speaking a query is asking for information. Similarly in MS Access a query is used for retrieving information from the database tables. There are different types of queries in MS Access. In a query you can select a record, make table, update records, append or delete records.
In order to create a simple search query, first you have to install a Database on your computer. Let’s say that we have a Database “Our Customer” installed on the computer. Here the instructions are for MS Access 2007.
Now we will explore the process of creating a simple query to list the customer details in the “Our Customer” database with the following simple step by step instructions.
Instructions for creating queries in design view
Follow the steps given below to create a simple search query.
Step 1: open your database file in Microsoft Access.
Step 2: Click on the Create button on the main menu bar. A number of tabs will be listed.
Step 3: On the Other tab, click on the Query Design option. This will open the Show Table pop up window. This window has three options; table, query, & both. You need to choose the table option. It will open the tables listed in the database.
Step 4: To retrieve information from the table you desire, click on the table and then click on Add. Click Close to close the Show Table pop up window.
Step 5: Select the individual fields you want to display in the search/query results. There are 2 ways to accomplish this task. First, you can do this by either double clicking the “FirstName” field in your table or you can do this by left clicking on the “FirstName” field and hold the mouse button down to drag the field all the way to the first “field” column available. In the same way you can add more fields you want to be displayed in your search results.
Step 6: To get the results you desire run the query.
Step 7: you can run the query in two different ways .You can either click on the red exclamation point icon listed in the Result option under Design tab on the main menu bar, or click on the Query menu item and then selecting Run and this will display the results.
Step 8: The results of the query will be displayed in the form of rows of data separated into columns.
You can also save the query by following the below mentioned steps:
Step 1: You can save the query by clicking on the save icon on the title bar or you can perform this task in another way. For this, click on the File tab and a menu will open. From this menu, select Save As option.
Step 2: A Save As pop up window will open. You can type your name for the query.
These were some simple steps to create Search Queries in Microsoft Access