Access tutorial 9.9

Source: Internet
Author: User
Supplement 1: Use the simple table query wizard to create a query. First, click the new button in the Database window. The new query window is displayed, and select "simple query wizard" in the list box ", click OK. In the displayed simple query wizard window, select the name of the field to be used in the new query. Because these fields may be different

Supplement 1: Use the simple table query wizard to create a query. First, click the new button in the Database window. The new query window is displayed, and select "simple query wizard" in the list box ", click OK. In the displayed simple query wizard window, select the name of the field to be used in the new query. Because these fields may be different


SupplementI. Use the simple table query wizard to create a query

First, click the new button in the Database window. The new query window is displayed. Select "simple query wizard" in the list box and click "OK. In the displayed simple query wizard window, select the name of the field to be used in the new query. Because these fields may be in different tables or queries, You must select the expected table or query from the drop-down list of the table/query drop-down box, in this case, the field in the available field list box is all available fields in the selected table or query. Click "field" and then click "move to left" or "move to right" to use this option as a selected field in the new query. After selecting all required fields, click the next button in the window, name the new query in the next window, and click "finish, you can create a new query.

SupplementIi. Use the cross tabulation query wizard to create a query

Access supports a special type of total query, called cross tabulation query. With this query, you can view the calculated value in a format similar to a workbook. To create a cross tabulation query, first click the "new" button in the Database window, and click the "cross tabulation query wizard" item in the pop-up window, click OK. In the displayed "cross tabulation query wizard" window, select the name of the table or query containing the cross tabulation. Step 2: select the fields in the crosstab chart for row title. You can select up to three fields. Step 3: select the fields in the crosstab chart for column title. Step 4: select the value to be calculated at the intersection of the table. In step 5, name the new query and click "finish. This cross tabulation query is complete. As you can see, the cross tabulation query function is used to calculate the summary value.

SupplementIii. Create a query by using the query duplicate items wizard

In Access, you may need to search and classify records with the same values in the data table. You can use the "Search for duplicate items" Wizard provided by the system to quickly complete a "Search for duplicate items" query. First, click the "query" tab in the Database window, and then click the "new" button. In the "new query" dialog box, click "Search duplicate query wizard" and click "OK. The first step of the "Search for repeated items query wizard" is the same as the previous two query wizard. Select the query object as needed, and the second step selects the fields set to repeated values, the system automatically retrieves records in the data table based on the selected fields and classifies the records based on the specified fields. Step 3 select another query field. In fact, the query selected hereContentIt is the information you want to know, that is, what records have the sameContent. In the last Wizard dialog box, enter the title of the new query, accept the default value provided by the system, and select the operation after the query is generated, you can choose to open the query view information in the "data table" view or modify the query design in the "design" view. Click "finish" to end the creation of the query.

Supplement4. Use the query wizard to create a query

In Access, you may need to search records in the data table to check whether they are related to other records and whether they are actually meaningful. You can use the "Search for unmatched query wizard" to quickly complete the process. Click "new" in the Database window. In the "new query" dialog box, click "Search for unmatched query wizard" and click "OK. The first step of the Wizard is to select the two objects to query, that is, record the two data tables. After the selection, click "Next. In the next step, select the fields that match the two selected tables. The system automatically retrieves the matching fields to view the unmatched records. Step 3 Select fields that can represent the query records. You can select user-required fields from the list of available fields on the left of the dialog box to the right window. In the last Wizard dialog box, enter the title of the new query, accept the default value provided by the system, select the operation after the query is generated, and click "finish" to end the creation of the query.

SupplementV. Create an SQL query

SQL query is a query created directly using SQL statements. In fact, all Access queries can be considered as an SQL query, because Access query is based on SQL statements to implement the query function. However, when an Access query is created, not all queries can be created in the "design" view of the query provided by the system. Because queries can only be implemented through SQL statements, SQL queries can be divided into the following four types: Joint query, transfer query, data definition query, and subquery. To create an SQL query in Access, first create a new query, click the "View" menu, and select the "SQL View" command. A text box appears on the screen, used to write SQL statements. After entering the SQL statements used, click the "View" menu and select the "data table View" command to see the role of the SQL statement.

SupplementVi. Create a parameter query

Parameter query can automatically modify the query rules during the query process. When you perform a parameter query, an input dialog box is displayed, prompting you to enter information. This query is called a parameter query. When you need to query parameters for a field, first switch to the design view of the query, and then in the "criterion" cell under the field used as the parameter, enter the text in square brackets. When the query is running, Access displays the prompt. After the input, switch the query to the data table view. A dialog box is displayed on the screen, asking which parameter you need to restrict. Enter certain conditions to view the records that meet the conditions. Access parameter query is based on the selection of queries or cross queries. Before Running select queries or cross queries, a parameter dialog box for setting criteria is provided, you can easily change the query restrictions or objects. Of course, you can not only create a single parameter query, but also create a standard prompt query for other fields.

Supplement7. Set query attributes

To set the query attributes, first open a query, and then click the "attributes" button on the toolbar to modify the query attributes in the displayed query attribute list box. Many of the query attributes are easy to understand. Now we introduce several attributes that are not commonly used but are useful:

Run permission: set this attribute to "owned ". After this attribute is set, all users have the query owner's permission to view and execute the query. In this way, the query owner can save the changed query, and only the query owner can change the ownership of the query.

Record set type: the record set type includes dynamic set, dynamic set (inconsistent update), and snapshot. When a dynamic set is selected, the values in the queried data table can be modified and the calculated values are dynamically modified. However, when the snapshot status is set, the data in the data table cannot be modified.

Getting startedTutorial9.9SupplementContent"/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.