en uk

Creating a query that finds duplicate field data Microsoft Access 2007

    Suppose you sell a hundred different products. How can you tell which products customers are buying the most? To find the answer to this type of question, you could search your database manually to find a Products Sold field and then count how many times each product appears.

    As a simpler solution, you can create a query that finds and counts how many times duplicate data appears. To create a query to find duplicate field data, follow these steps:

    1. Click the Create tab.

    2. Click the Query Wizard icon in the Other group.

    The New Query dialog box appears (refer to Figure 17-8).

    3. Click Find Duplicates Query Wizard and then click OK.

    The Find Duplicates Query Wizard dialog box appears, asking you to choose the database table to search.

    4. Click a database table and then click Next.

    Another dialog box appears, asking you to choose the fields to examine for duplicate data, as shown in Figure 17-18.

    Creating a query that finds duplicate field data Microsoft Access 2007

    Figure 17-18:

    Define one or more fields to search for duplicate data.

    5. Click a field name and then click the > button. Repeat this step for each additional field you want to search.

    6. Click Next.

    Another dialog box appears, asking whether you want to display any additional fields. If you choose to look for duplicate data in a Product field (Step 5) to see which products are most popular, you can display additional fields such as each salesperson's name so you can also see who is responsible for selling the most products.

    7. Click a field and click the > button. Repeat this step for each addi­tional field you want to display.

    8. Click Next.

    A dialog box appears, asking whether you want to give your query a descriptive name.

    9. Type a descriptive name in the top text box and then click Finish.

    Access displays your query as a separate tab.

    10. Click the Office Button and then choose Save to save your query.




BACK NEXT TOP

Site is a private collection of materials and is an amateur informational and educational resource. All information is obtained from public sources. The administration does not apply for authorship of the materials used. All rights belong to their owners.