Types of Query in MS Access
MS Access Query Option
How to Setup MS Access Query Criteria and Parameters
How to Create MS Access Total Query
How to Create Ms Access Reports
How to Find and Remove Duplicates MS Access Query
What is Query in Ms Access
When you use any of our Ms Access templates, have you ever notice about What is Query in Ms Access? You may see some of them in the left toolbar, the highlighted on in the picture.
The query is the feature in Ms Access to review, add, update, or delet data from the Access database. By using query, you can make specific criteria or conditions such as using Right syntax
, filtering, calculate the mathematical field, sorting, and manage the multiple data at the same time.
To create Query, you need to have at least 2 tables:
1. Go to Create > Query Design.
2. In design tab, click the Show Table to insert the desired table, or other query.
3. You will see the tables and the fields within. Add the relationship by dragging the primary key field into another tables. To edit or delete the relationship, right click the relationship line and select Join or delete.
4. In the properties, select the desired field for the query. Tick the checkboxes to show the field to the query or not.
5. This step is if you want to add new conditional field, (such as subtotal or need to use syntax to the field). For example, we want to add the new category to the book, which is taken from the first 2 characters from the BookSubject field. In the properties box, input this to the Field:
The BookCategory is the new field name. After the colon symbol, input the syntax. Note that it just an example, you can change the new field name and the syntax depends on the field function, such as summary syntax for subtotal. However be careful with the syntax, because it is the code that must be flawless, or it will not work.
6. Lastly, right click the Query menu. Select Datasheet view to see the tables form of the query. You can click the SQL view to see the sql syntax. To change the query name, in the left toolbar (see in the first picture), right click and select rename.
With the query, it is easier to manage the relationship between tables especially if it ER Diagram. It will be easier for creating forms.