Saturday, March 5, 2022

Microsoft Access : Create a select query by using the Simple Query wizard and Design View


How to Create tab in Microsoft Access includes two commands in its Queries group:

  1. Query Wizard
  2. Query Design

To run a query :

  1. In the Navigation pane, double-click the query.
  2. In Design view, click Runon the Query Tools Design tool tab.

To save a query :

  1. On the Quick Access Toolbar, click Save.
  2. In the Save As dialog box, enter a name for the query, and then click OK.

To delete a query :

    In the Navigation pane, right-click the query, and then click Delete.

To create a select query by using the Simple Query wizard :

  • On the Create tab, in the Queries group, click Query Wizard.
  •  In the New Query dialog box, select Simple Query Wizard, and then click OK.
  • In the Simple Query wizard, in the Tables/Queries list, select the first table or query you want to use for this query. From the Available Fields list, add the fields you want to include in the query to the Selected Fields list. Click the chevron button to move all the fields to the Selected Fields list.
  •  Repeat step 3 to include other tables or queries in the select query, and then add the fields you want to include. Click Next.
  • If the query includes numeric fields or fields from more than one table, the wiz-ard prompts you to create a detail query or a summary query. If you select the Summary option, click Summary Options, and then select the summary function you want to apply to the fields that Access lists. Click OK in the Summary Options dialog box, and then click Next.
  • If prompted by the wizard, choose an option to group dates in the query.
  • On the wizard’s last page, enter a name for the query, and then choose whether to open the query to review the results or open the query in Design view.

To create a select query in Design view :

  1. On the Create tab, in the Queries group, click Query Design.
  2. In the Show Table dialog box, select the tables or queries you want to use in the query. Click Add to add the objects to the Query Designer, and then click Close.
  3. From the field lists, drag the fields you want to include in the query to the Field row in the query design grid. (You can also select fields from the list that Access displays when you click the arrow in the Field row in the query design grid.)
  4. Define selection criteria for the query in the Criteria row and the Or row depending on which records you want the query to return.
  5. In the Results group on the Query Tools Design tool tab, click Run to display the records returned by the query.

No comments:

Post a Comment