Topic 9: Planning a query

Go to Topic 10 * Access Database Skills Table of Contents * Technology Skills

  1. How will the query be used?
    • Printed directly from the query screen
    • Used as the source of a report
    • Used as the source for a data entry form or subform
    • Used as the source for a combo box (dropdown list)
  2. What is the primary table -- the table that holds all or most of the data you want to use? Are there related tables that hold data that you will want to use?
  3. How are these tables related?
    • What field(s) do they have in common? Draw a line to show the relationship.
    • Is it a one-to-one relationship? One-to-many? Many-to-one? Think ahead so that you'll know what to expect. For example, since each student may have several job placements, a query that joins a STUDENT table to a JOBPLACEMENTS table will show several entries per student.
    • Are there any unmatched records? If yes, do you want these included in the query? Double click on the line that joins these tables and choose the join type. For example, in a query that includes STUDENTS and a table of NONTRADITIONALCIPCODES you might want to include all students, even if their CIP Code is not in the list of NonTraditional CIP Codes.
  4. What fields do you want in the query? (Put in field line in grid)
  5. How do you want the query sorted, if at all? Enter "Ascending" and "Descending" in the Sort line of the grid. Put fields that you want to sort by first on the left ... for example you may want to sort by GraduationYear, then Lastname, then Firstname.
  6. What criteria do you want to use to select records? Put criteria in the criteria line(s) in the grid.