Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Switch back to Datasheet view to add sample records to the Sales table

Switch back to Datasheet view to add sample records to the Sales table

Computer Science

  1. Switch back to Datasheet view to add sample records to the Sales table.
    1. Add three records to the table with the following data. (Hint: Remember, the first field in the table, SaleID, is an AutoNumber field, so there is nothing to enter for each record.)
       

SaleDate

SaleLocation

PaymentType

10/01/2019

Georgetown

Cash

10/01/2019

Farragut Square

Gift Card

10/01/2019

George Washington University

Credit Card

  1. Adjust the width of the SaleDate field so the entire long date is visible.
  2. Save and close the table.
  3. Make aF new table to capture the details for each sale.
    1. The first field should be an AutoNumber field named: SaleDetailID
    2. The second field should be a lookup field named: SaleID The lookup field should be limited to values in the SaleID field of the Sales table. Include only the SaleID in the lookup field. Enable data integrity by restricting deletions.
    3. Save the table as: SaleDetails
    4. Add a third field to the far right of the table. Name this field: Item This is another lookup field. Include all the fields from the Items table. Sort the lookup items by values in the ItemName field. Hide the primary key field. Enable data integrity by restricting deletions.
    5. Add a Number field to the right of the Item field. Name the field: Quantity
    6. Set the default value for the Quantity field to: 1
    7. Add three records to the table with the following data. (Hint: Remember, the first field in the table, SaleDetailID, is an AutoNumber field, so there is nothing to enter for each record.)
       

SaleID

Item

Quantity

1

Chocolate

4

1

Sea Salt and Caramel

2

2

Truffle

3

  1. Close the table.
  2. Use the Form Wizard to make a new form for inputting sales data.
    1. Include all the fields from the Sales table.
    2. Include the Item and Quantity fields from the SaleDetails table.
    3. View the form data by records in the Sales table with related records in the SaleDetails table displayed in a subform.
    4. The subform should be displayed as a Datasheet.
    5. Name the main form: SalesForm and name the subform: SaleDetailsSubform (Hint: Be sure to remove the space between SaleDetails and Subform in the subform name suggested by Access.)
    6. Open the form in Form view to review your work.
    7. Navigate to the record in the main form for SaleID 3 and enter sale details in the subform as follows:
       
    8. Close the form.
  3. Open the Items table and modify the table fields as follows:
    1. Set the Default Value property for the Price field to: 7
    2. Change the data type for the Price field to: Currency
    3. Autofit the width of the ItemName field.
    4. Save the changes and close the Items table.
  4. Make a Single Record form using the Items table as the record source. Save the form with the name: SingleRecordForm
  5. Begin a new blank form in Layout view.
    1. From the Locations table, add the LocationID, LocationDescription, and Comments fields in that order, at the left side of the form.
    2. Widen the labels so that they are just wide enough for LocationDescription to be completely visible.
    3. From the Locations table, add the OpenTime field to the right of the LocationID controls.
    4. Reduce the width of the OpenTime bound control so that the control is just wide enough to display the time data.
    5. From the Locations table, add the CloseTime field to the right of the OpenTime controls.
    6. Reduce the width of the CloseTime bound control so the control is just wide enough to display the time data.
    7. Move the OpenTime and CloseTime controls so they are next to the LocationDescription controls instead.
    8. From the Locations table, add the Days field to the form layout in the empty space to the right of the LocationID controls, above the OpenTime controls.
    9. Add a logo to the form header. Use this file, located with the resources for this project: toptCornLogo-small.png
    10. Save the form with the name: LocationsDetailsForm
  6. Close the forms.
  7. Open the SalesArchive table.
    1. Delete the Total field.
    2. Find the record with the ID 500 and delete it. (Hint: It is the last record in the table.)
    3. Find and replace each ItemID value OLDB with OLDB005.
    4. Rename the TotalSal field to: TotalSale
    5. Save and close the table.
  8. Use the Relationships window to make a relationship between the Items and SalesArchive tables.
    1. Show the SalesArchive table in the Relationships window.
    2. Make a one-to-many relationship between the ItemID field in the Items table and the ItemID field in the SalesArchive table. You may rearrange the tables in the Relationships window if you want.
    3. Enforce referential integrity so a record cannot be deleted or altered in the Items table if it would cause a conflict with the data in the SalesArchive table.
    4. Close the Relationships window and save the changes.
  9. Make a query to display sales of Truffle flavored popcorn from the SalesArchive table.
    1. Include the following fields in this order: the SaleDate, Quantity, and TotalSale fields from the SalesArchive table and the ItemName field from the Items table.
    2. Add the criteria Original Blend to the ItemName field. Run the query to check your work. (Hint: There should be 34 records in the query results.)
    3. Save the query as OriginalBlendQry and then close the query.
  10. Make a query to display sales of Old Bay or Truffle flavored popcorn from the SalesArchive table
    1. Include the following fields in this order: the SaleDate, Quantity, and TotalSale fields from the SalesArchive table and the ItemName field from the Items table.
    2. Add the criteria Old Bay or Truffle to the ItemName field. Run the query to check your work. (Hint: There should be 55 records in the query results.)
    3. Save the query as NewFlavorsQry and then close the query.
  11. Make a query to display sales for more than $50.00 from the SalesArchive table.
    1. Include the following fields in this order: the SaleDate from the SalesArchive table, ItemName field from the Items table, and TotalSale from the SalesArchive table.
    2. Add criteria to the TotalSale field to return only sales greater than 50.
    3. Specify the sort order in the query, so the results always display the records with the highest values in the TotalSale field first. Run the query to check your work. (Hint: There should be 14 records in the query results.)
    4. Save the query as HighDollarSalesQry and close it.
  12. Make a query to display sales for more than $50 of Truffle flavored popcorn from the SalesArchive table
    1. Include the following fields in this order: the ItemName field from the Items table and the SaleDate, Quantity, and TotalSale fields from the SalesArchive table.
    2. Add the criteria to the query to return only records where the ItemName is Truffle and the TotalSale is greater than 50. Run the query to check your work. (Hint: There should be 6 records in the query results.)
    3. Save the query as HighDollarTruffleQry and then close the query.
  13. Use the Report Wizard to make a report based on the NewFlavorsQry query.
    1. Include the fields from the NewFlavorsQry query in this order: ItemName, SaleDate, Quantity, and TotalSale.
    2. View the data by the Items table.
    3. Do not add any additional grouping.
    4. Sort the detail records by sale date.
    5. Use the Stepped layout in Portrait orientation.
    6. Name the report NewFlavorRpt and then view the report to check your work.
  14. Make a new report from scratch in Layout view.
    1. From the SalesArchive table, add the SaleDate field to the report. Add these fields in order to the right of the SaleDate controls: ItemName from the Items table, and Quantity and TotalSale from the SalesArchive table.
    2. Resize the ItemName controls so all the item names are visible. (Hint: Widen the ItemName column so the entire Sea Salt and Caramel name is visible.)
    3. Add the ItemID field from the Items table. Move the ItemID controls so they appear to the left of the ItemName controls.

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE