Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,594 members, 7,823,583 topics. Date: Friday, 10 May 2024 at 11:59 AM

How To Build Advanced Queries Through Ms Access Query Wizard - With Images - Computers - Nairaland

Nairaland Forum / Science/Technology / Computers / How To Build Advanced Queries Through Ms Access Query Wizard - With Images (942 Views)

How To Design & Customize A Professional Switchboard For Ms Access Databases / Guides To Building Advanced & Action Queries In Ms Access 2013 & 2016 / Business Application Of Ms Access Query Functions In Students Gradelist System (2) (3) (4)

(1) (Reply)

How To Build Advanced Queries Through Ms Access Query Wizard - With Images by microsofttutor(m): 2:38pm On Apr 02, 2017
Like I said earlier in part 1 of this chapter at http://www.microsofttut.com/2017/03/how-to-build-advanced-action-queries-in-ms-access.html, there are queries that are better built or designed through MS Access query wizards. The main 3 queries that I will advise you to build through the query wizards are:
1. Find Duplicates Query
2. Find Unmatched Query
3. Crosstab Query

You can also build these 3 queries through the query design but it will be very tedious. Also it is very difficult to debug their errors. But the Microsoft Access Query wizard simplifies the design steps for you and also reduces the possible errors.

You can also build simple select query through the query wizard, but building it through query design gives you more flexibility because it allows you to construct everything from the scratch.

Other queries like the four action queries (make table, update, append and delete queries), parameter queries are better and easier to build through query design.

I will now show you how you can utilize MS Access query wizard to easily build the Find Duplicates query, Find Unmatched query and Crosstab query. In part 1 at http://www.microsofttut.com/2017/03/how-to-build-advanced-action-queries-in-ms-access.html, I explained action queries in detail. See also the other MS Access topics I have explained in the previous chapters at http://www.microsofttut.com/p/course-content-for-microsoft-access.html.

FIND DUPLICATES QUERY
This type of advanced query helps you find records with duplicate field values in a single table or a previously created query. When using MS Access query wizard to create the find duplicates records query, you will be required to specify the field or column on which the query filter process will be based i.e. the field that could contain the duplicate field values.

For example, a university registrar may want to filter out the records of students that will graduate in a particular date or the dates where more than one student will graduate. In either cases, he will specify the REG DATE field in the query wizard as the field that will contain the duplicate values.

To Build the Find Duplicates Query through MS Access Query Wizard:
1. Click the Create tab and then click the Query Wizard icon located in the Queries group.

2. This prompts the New Query Wizard dialogue box. Select Find Duplicates Query Wizard, then click OK as shown below.

3. Next, select the table that may contain duplicate values. Referring to the above example, the name of the table is Students Record, then click Next.

4. Select the field(s) that may contain duplicate field values or information. Also referring to the above example, I will select the REG DATE field because it is the field that has the duplicate registration date values.

5. With that field selected, click the single forward pointing arrow button (>wink to move the selected field from Available fields to Duplicate-value fields, then click Next as shown below.
Click to transfer the duplicate value fields

6. Select the other fields that you would like the find duplicates query to display in addition to the duplicate value fields you selected earlier. You can select all the remaining fields if you wish. Then click Next as shown below.
Select other fields to display in addition to the duplicate value fields

7. Type a unique name for the query, Specify whether to view the query or modify the query design further, then click Finish as shown below.
Enter a name for your find duplicates query

8. MS Access runs the query and displays the records for you. Check whether the find duplicates query returned the desired result, then close the query.

FIND UNMATCHED QUERY
This type of advanced query helps you find records in one table that have no related records in another table. The Find Unmatched Records query compares the two table and filters the records that have no related record in the order table. This means that both tables must have a matching field in which MS Access will base its comparison and filter process in the query wizard.

For example, a university registrar has been making use of two similar tables namely: Students Former List and Students Recent List to store the records of new students and he knows that the records of some set of students are contained in both tables. If he wants to filter or extract the records of the other students that are not duplicated in the two tables, then he must use the Find Unmatched Query. The two tables are shown below.

Students’ former list table

Students’ current list table

The 2 tables have the same structure. Now, studying the two tables closely, which field do you think could best serve as the matching field?

Answer: The REG NUM field of course. This is because 2 different students other information may coincide, but the registration number can never be the same

To Build the Find Unmatched Query through MS Access Query Wizard:
1. Click the Create tab and then click the Query Wizard icon located in the Queries group.

2. This prompts the New Query Wizard dialogue box. Select Find Unmatched Query Wizard, then click OK as shown below.
Click find unmatched query wizard
3. Next, the find unmatched query wizard asks you to specify the first table or query that contains records you want in the query results. You can specify any of the tables first. So referring to the example above, I will select the Students Former List table. Click Next as shown below.
Select the first table that contains desired records
4. Next, you specify the other table or query that contains the related records. In my case, I will now select the Students Current List table. Click Next as shown below.

Select the second table that contains related records

5. Now you have to specify the matching fields in both table. These fields must have the same data type and must contain similar or related data or information. Referring to the above example, the matching field is the REG DATE field, so I will select this field in both table. Click the Matching fields button in between the two tables, then click Next as shown below.

Click the matching fields button

6. Next, select the other fields you would like to see in the find unmatched records query results and click Next.

7. Type a unique name for your new find unmatched records query. Specify if you would like view the query results or to modify it further in the query design view. Then Click Finish as shown below.
Type a name for your unmatched query

8. MS Access now runs the query and displays the records that do not match in both tables as shown below. Cross check the query results to see if it returned the desired records. Then close the query.
Find unmatched query result

CROSSTAB QUERY
This type of action query is used to calculate and restructure data for easier analysis. Crosstab query can be used to calculate a SUM, AVERAGE, COUNT or other types of total functions for data that are grouped by two types of information. When using the crosstab query, you have to specify the Row Heading field(s), the Column Heading field and the Calculation field.

Click http://www.microsofttut.com/2017/04/how-to-build-advanced-queries-through-query-wizard.html to study full tutorial with screen to screen images.

1 Share

(1) (Reply)

I Need A Laptop Screen 15.6 Inches / Motherboard And Some Computer Spares Forgotten In My Friend's Vehicle / Step By Step Instructions To Prevent Your Macbook From Overheating

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 25
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.