As a group or individually please do the following: Choose a company, any company, but preferably one that one of you are familiar with or with which you have some sort of direct contact or knowledge.


Shelly Cashman Access 2016 | Module 2: SAM Project 1a

West Coast Outdoor Advertisers

CREATING AND MODIFYING queries


GETTING STARTED
  • Open the file SC_AC16_2a_FirstLastName_1.accdb, available for download from the SAM website.

  • Save the file as SC_AC16_2a_FirstLastName_2.accdb by changing the “1” to a “2”.

    • Hint: If you do not see the .accdb file extension in the Save As dialog box, do not type it. Access will add the file extension for you automatically.

  • Open the _GradingInfoTable table and ensure that your first and last name is displayed as the first record in the table. If the table does not contain your name, delete the file and download a new copy from the SAM website.


PROJECT STEPS
  1. Open the Billboard Listing Query in Design View. Delete the Facing field from the query, and then save, run, and close the query.

  2. Create a new query in Query Design View based on the AdRep table with the following options:

    1. Add the fields AdRepNumber, LastName, FirstName, and DateHired to the query in that order.

    2. Add an ascending sort to the DateHired field.

    3. Save the query with the name AdRep Hired Query.

Run the AdRep Hired Query, and then close it.

  1. Create a new parameter query in Design View based on the Billboard table with the following options:

    1. Add the BillboardID, Location, DEC, City, and State fields (in that order) from the Billboard table to the query.

    2. Add the criterion [Enter State] (including brackets) to the State field.

    3. Save the query with the name State Billboard Query.

Run the State Billboard Query to confirm that it works. (Hint: If you use WY for the parameter value, the query should return four records.) Save and close the query.

  1. Create a new query in Design View based on the AdRep and Advertiser tables with the following options:

    1. Add the AdvertiserName field from the Advertiser table to the query.

    2. Add the FirstName, LastName, and PhoneNumber fields (in that order) from the AdRep table to the query.

    3. Save the query with the name AdRep-Advertiser Query.

Run the AdRep-Advertiser Query, and then save and close it.

  1. Open the Unique Cities Query in Design View. Modify the query to list all cities only once. (Hint: Click the second field in the Design grid, open the property sheet, and change the Unique Values property for the query.) Run the query, and then save and close it. (Hint: The query should return 18 records.)

  2. Create a Crosstab query based on the Billboard table with the following options:

    1. Use only data from the Billboard table in the crosstab.

    2. Use the State field for the row headings.

    3. Use the Type field for the column headings.

    4. Use a Count of the BillboardID field as the calculated value for each row and column intersection, and include row sums in the crosstab query.

    5. Save the query with the name State-Type Crosstab.

View the query, and then save and close it.

  1. Open the Top Values Query in Design View. Modify the query to sort the Current Due amounts in descending order. Change the Return value to display only the top 25% of the records. Run the query, and then save and close it.

  2. Open the Oregon Digital Query in Design View. Add criteria to select only those records where the Type field is equal to Digital and the State field is equal to OR. Run the query, and then save and close it.

  3. Open the SqrFt Area Query in Design View. Modify the query by creating a calculated field to compute the square footage of a bulletin board. Enter SqrFt: [Height]*[Width] in the Zoom dialog box of the first empty column in the design grid. Run the query, and then save and close it.

  4. Open the Caption Query in Design View. Modify the query by adding the caption for the Facing field to Direction. Run the query, and then save and close the query.

  5. Open the No Current Due Query in Design View. Modify the query to show only records where the Current Due field is equal to 0. Run the query, and then save and close it.

  6. Open the Washington Advertisers Query in Design View, hide the State field in the query, and then save and close it. (Hint: Do not delete the State field from this query.)

  7. Open the Billboard Type Query in Design View. Add criteria to select only those records where the Type field is equal to Bulletin or to Digital. Run the query, and then save and close it.

  8. Open the Multiple Sort Query in Design View. Modify the query to sort the records in ascending order first by the AdRepNumber field and then by the AdvertiserName field. Run the query, and then save and close it.

  9. Open the Small Audience Query in Design View. Add criteria to select only those records where the value in the DEC field is less than 2000. Run the query, and then save and close it.

  10. Open the Billboards by Type Query in Design View and modify it by adding Totals to the query, as described below:

    1. For the Type field, set the total row to Group By.

    2. For the BillboardID field, set the total row to Count.

Run the query, and then save and close it.

  1. Open the G Advertisers Query in Design View. Add the G* wildcard criteria to the AdvertiserName field, so that the query only returns records when the advertiser name begins with G. Run the query, and then save and close it.

  2. Use the Report Wizard to create a new report (shown in Figure 1 below) based on the All Advertisers Query with the following options:

    1. Include all fields from the All Advertisers Query.

    2. Group the report by LastName and use no additional grouping in the report.

    3. Use no additional sorting in the report.

    4. Use a Stepped layout and Portrait orientation for the report

    5. Set the title of the report to All Advertisers Report.

Preview the report, and then save and close it.


Figure 1: All Advertisers Report

As a group or individually please do the following: Choose a company, any company, but preferably one that one of you are familiar with or with which you have some sort of direct contact or knowledge. 1



Save and close any open objects in your database. Compact and repair your database, close it, and then exit Access. Follow the directions on the SAM website to submit your completed project.