Setting new query

To get information from tables are designed Queries. This object in Access gets the data from tables or other queries like filters in Excel, but at a much more advanced level. Queries can not only filter but also to count, group, and even make multiple changes in tables – eg. increasing the price of all products. If this guide has helped you, become a fan on Facebook and recommend this site to your friends, it can be useful for them too

Making of query

We create a new query through Create tab .

  • Query Wizard … step by step, create a simple query
  • Query design … creates a new query and will switch to Design view

According to personal experience, I prefer the Query Design. After creating the query is first shown a list of tables or previously saved queries. The user selects, from which data will be query created. Query window consists of:

  • upper space for tables or queries from which we obtain data
  • lower space or a criteria grid is subdivided into:
    • Field … name od column, with which we work
    • Table … table name in which column appears
    • Sort … you can sort the columns in a query in ascending or descending order
    • Show … sometimes it is advisable to hide the column, even though it counts
    • Criteria … area for creating search conditions

Adding a field to a query is done 2X clicking on the name field in the upper area of the table.

Adding a table to the query is performed by the Show table icon on the Design tab of the Design View.

Tvorba Dotazu
Query creation

Save the query

Object designs should always be saved. The quickest way is to use a small floppy disk icon on the Quick Access Toolbar on, or in File> Save Object As. Query name may have a maximum of 64 characters and can not contain any special symbols. It’s good to get used appropriately naming objects and this procedure applied to the entire database. Example of names may be qry_OrdersCount or qryOrdersCount etc.

After saving the query, it can be activated by selecting Home> Views > Data Sheet. Saved query in the Navigation pane is activated and 2x click.

Similar posts about this topic

Zanechat komentář

Your email address will not be published. Required fields are marked *

Scroll to Top