Example: Delete Query

In the LanguageArtsClasses database an append query was used to add partial records to assist in recording the scores for an assignment. If that query was accidentally run twice, there would be duplicate records. How can we find and remove such duplicate records??

Dialog: New Query - Find Duplicates Query WizardAccess has a wizard for creating a query that finds duplications. The datasheet will show both sets of records.

Once you have created the Find Duplicates query, a little inspection of the datasheet shows where the duplicate records start. (Score ID 9619 and larger in this case.)
Query Design View: Find Duplicates - with criteria to pick out selected recordsNow we can add a criteria to pick out those records and turn the query into a Delete query.
 

When you run the delete query, a message appears, telling you how many records you are going to delete. There should be 92 for this query.

Remember... You cannot Undo a delete query's action.
 


Lessons Databases Appendix




Teachers: Request permission to use this site with your class
 
Copyright 1997-2012 Jan Smith   <jegs1@jegsworks.com>
All Rights Reserved

Icon: DonwloadIcon: CDWant a local copy with no ads? - Download/CD

Want to help?


~~  1 Cor. 10:31 ...whatever you do, do it all for the glory of God.  ~~


Last updated: 30 Apr 2012