Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Open the Sales table and add three records to the table with the following data. ( Hint: The first field in the table, SaleID, is
Open the Sales table and add three records to the table with the following data. Hint: The first field in the table, SaleID, is an AutoNumber field, so there is nothing to enter for each record.
SaleDate SaleLocation PaymentType
K Street Credit Card
George Washington University Cash
Georgetown Credit Card
Switch to Design view and modify field properties.
Apply the Long Date format to the SaleDate field. Note: If your version of Access does not include the day of the week in the long date format, use the long date format anyway.
Switch back to Datasheet view and adjust the width of the SaleDate field so the entire long date is visible. Save the table when prompted.
Close the table. Save the table when prompted.
Create a new table to capture the details for each sale.
The first field should be an AutoNumber field named: SaleDetailID
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.
Save the table as: SaleDetails
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.
Add a Number field to the right of the Item field. Name the field: Quantity
Set the default value for the Quantity field to:
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
Chocolate
Old Bay
Truffle
Close the table.
Use the Form Wizard to create a new form for inputting sales data.
Include all the fields from the Sales table.
Include the Item and Quantity fields from the SaleDetails table.
View the form data by records in the Sales table with related records in the SaleDetails table displayed in a subform.
The subform should be displayed as a Datasheet.
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.
Open the form in Form view to review your work.
Navigate to the record in the main form for SaleID and enter sale details in the subform as follows:
Item: Truffle, Quantity:
Item: Old Bay, Quantity:
Close the form.
Open the Items table and modify the table fields as follows:
Set the Default Value property for the Price field to:
Change the data type for the Price field to: Currency
Autofit the width of the ItemName field.
Save the changes and close the Items table.
Create a Single Record form using the Items table as the record source. Save the form with the name: SingleRecordForm and then close the form.
Begin a new blank form in Layout view.
From the Locations table, add the LocationID, LocationDescription, and Comments fields in that order, at the left side of the form.
Widen the labels so LocationDescription is completely visible.
Save the form with the name: LocationsForm and then close the form.
Open the SalesArchive table.
Delete the Total field.
Find the record with the ID and delete itHint: It is the last record in the table.
Find and replace each ItemID value OLDB with OLDB
Rename the TotalSal field to: TotalSale
Save and close the table.
Use the Relationships window to create a relationship between the Items and SalesArchive tables.
Show the SalesArchive table in the Relationships window.
Create a onetomany 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.
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.
Close the Relationships window and save the changes.
Create a query to display sales of Truffle flavored popcorn from the SalesArchive table.
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.
Add the criteria Truffle to the ItemName field.Run the query to check your work. Hint: There should be records in the query results.
Save the query as TruffleQry and then close the query.
Create a query to display sales greater than $ from the SalesArchive table.
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.
Add criteria to the TotalSale field to return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started