Queries are used to sort or filter data and display data from more than one table at a time. Although you can certainly build forms and reports that get their data directly from tables, most the time you will want to aggregate data from a number of tables at one time.
There are two basic types of queries within Microsoft Access.
A selection query takes information from the tables and queries in your database. When you define and run a select query Microsoft Access creates a recordset of the selected data. In most cases, you can work with a recordset in the same way that you would with the table or form. You can browse through it, select information from it, print it and even update data within it. Unlike a real item, a recordset doesn’t actually exist in your database. Microsoft Access creates the recordset from the data in the source tables of your query at the time you run the action and provides you with a readout of the desired information from your web or cloud database.
Action queries insert, update or delete data. These queries will be essential when learning how to work within web databases. However, it is important to understand the basic functions of queries and how they operate within simple databases because all the techniques you use for working with a single table apply equally to more complex multiple table queries and all action queries will in fact begin as simple selection queries. Action queries can be used to archive data that is no longer essential to your cloud database, so that, if the data ever becomes relevant again, the record can be easily recalled.
Within design view, you will notice that queries possess a few specific visual signifiers that you may not be familiar with as of yet. The first is the asterisk (*) symbol. At the top of each field list in the upper part of the query window is an asterisk. This symbol is shorthand for selecting all the fields in the table or query with one entry on the field line. You can simply add the astrisk to the design grid to include all the fields from a list, or you can use the check boxes seen in the show row to indicate the fields that will be included in your recordset.
Next is the exclamation point (!) symbol. This symbol can be seen in most of the query commands pictured in the ribbon, and simply serves to remind you that a query must be run before it can create a recordset based on the design stipulations. When you begin to work with queries it is important that you identify the run command located in the ribbon within the query group.
Queries are the best way to focus on the specific data you need for the task at hand. You’ll also find the queries are useful for providing choices for combo and list boxes, which makes entering data in your database much easier.
For more information on running queries and other basic functions of Microsoft Access check back with the Access Hosting blog or contact Access Hosting customer support for immediate assistance with issues concerning your cloud database.