access integrated project 1

Upload: mohini-sharma

Post on 02-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Access Integrated Project 1

    1/5

    Access 2013: In Practice Integrated Access Project 1 (Chapters 1-4) Page 1 of 5

    Access 2013: In Practice (Chapters 1-4)

    Integrated Access Project 1

    For this project, you enhance the functionality of a database for Magnificent Meals, a home-cooked

    meal preparation and delivery company. You edit properties in the database table and import data fromExcel. You create a form using the Form Wizardand improve the functionality by modifying the layout.

    Finally, you create a query and add a parameter to that query.

    [Student Learning Outcomes: 1.2, 1.4, 2.1, 2.2, 2.4, 2.7, 3.2, 3.4, 3.6, 4.1, 4.2, 4.3]

    Files Needed: MagnificentMeals.accdband MenuData.xlsx

    Completed Project File Names: [your initials] Access Project 1.accdb

    Skills Covered in this Project

    Add database properties.

    Change the datasheet layout.

    Open, save, and close, a table.

    Edit a table using Designview.

    Edit field properties in Designview.

    Create a lookup field.

    Import records from Excel.

    Create a query in Designview.

    Execute a query.

    Sort query results

    Add a parameter to a query.

    Create a form using the Form Wizard.

    Edit a form in Layoutview.

    Move fields within the control layout.

    Set form properties to limit user edits and deletes.

    Test the functionality of a form.

    1.

    Open the MagnificentMeals.accdbdatabase file from your student data files andsave it as[your

    initials] Access Project 1.

    2.

    Open the Mealstable in Datasheetview. Verify that the table does not contain any records.

    3.

    Edit field properties of the Mealstable in Designview.

    a.

    Switch to Designview.

    b.

    Change the Data Typeof the DateAddedToMenufield to Date/Time.

    c.

    Select a Short DateFormat for theDateAddedToMenu field.

    d.

    Make all fields Required.

    e.

    Save the table.4.

    Create a lookup field using the Lookup Wizard.

    a.

    For the MealTypefield, use the Lookup Wizardto create a lookup field.

    b.

    Type the following values as list choices:Main Course

    SideDish

    Soup

    Dessert

    c. Dont change the label for the lookup field; it should be MealType.

  • 8/10/2019 Access Integrated Project 1

    2/5

    Access 2013: In Practice Integrated Access Project 1 (Chapters 1-4) Page 2 of 5

    Figure 1 MealListingsform after completing the Form Wizard

    d.

    Limit the choices to those on the list.

    e.

    Finish the Lookup Wizard.

    f.

    Enter 11in the Field Sizeof the MealTypefield.

    g.

    Save and close the table.

    5.

    Import data from Excel into the Mealstable.

    a.

    Launch the Get External Data Excel Spreadsheetdialog box.

    b.

    Locate and select the MenuData.xlsxExcel file.

    c.

    Append the records to the Mealstable.

    d.

    Click OKto launch the Import Spreadsheet Wizard.

    e.

    Finish the Import Spreadsheet Wizard. Close the Wizardafter the records have imported.

    6.

    Open the Mealstable in Datasheetview. Your table should contain 10 records.

    7.

    Change the layout of the Mealstable.

    a.

    Change the Font Sizeto 12 pt.

    b. Center-alignthe MenuIDfield.

    c.

    Use AutoFitto adjust the MealNamefield to the correct size.

    d.

    Save and close the table.

    8.

    Create a form using the Form Wizard.

    a.

    Add all the fields from the Mealstable to the form.b.

    Choose a Columnarlayout.

    c.

    TypeMealListingsin the Titlebox.

    d.

    Click the Finishbutton. The form opens in Formview (Figure 1).

  • 8/10/2019 Access Integrated Project 1

    3/5

    Access 2013: In Practice Integrated Access Project 1 (Chapters 1-4) Page 3 of 5

    Figure 2 Completed Form Design

    9.

    Edit the form in Layoutview.

    a.

    Switch to Layoutview. If the Field Listor Property Sheetopen, close them.

    b.

    Click the Labelbutton and then click to the right of the MealTypetext box. A new label is added

    to the form, but it is added on top of the current MenuIDlabel.

    c.

    TypeNutrition Information Per Servinginto the label and press Enter.

    d.

    Apply Boldformatting to the Nutrition Information Per Servinglabel.

    e.

    Use the arrow keys to move this label down and to the right of the MealTypecombo box. The

    exact placement is not critical at this point.

    f.

    Edit the MenuID, MealName, MealType, 3-ServingCost, 6-ServingCost, ServingSize, TotalFat,

    Sodium, Cholesterol, TotalCarbs, Protein, and DateAddedToMenulabels to match the label

    content shown in Figure 2. The edits add spaces to separate the words in the label caption, add

    a measurement value to the labels related to the nutrition information, or both.

    g.

    Save the form. Remember it is a good idea to periodically save your work after having made a

    number of changes.

    h.

    Move the Date Added To Menulabel and text box to the right of the Menu IDlabel and textbox

    (Figure 2). Remember that you can select multiple controls by pressing and holding the Shift

    key when selecting the controls. This allows you to more quickly make the same change to

    multiple controls.i.

    Adjust the size and location of the labels and text boxes on the form so they are similar to the

    layout shown in Figure 2. Some of the controls may need to be moved to a temporary location

    before you move them to the final location.

    j.

    Edit the label content, width, and location of the MealListingslabel in the header section.

    k.

    Save the form.

  • 8/10/2019 Access Integrated Project 1

    4/5

    Access 2013: In Practice Integrated Access Project 1 (Chapters 1-4) Page 4 of 5

    10.

    Edit the form properties to limit user edits and deletes.

    a.

    Open the Property Sheetof the form.

    b.

    Select Formin the Selection type.

    c.

    Set the Data Entry,Allow DeletionsandAllow Editsproperties to No.

    d.

    Set theAllow Additionsproperty to Yes.

    e.

    Close the Property Sheet.

    f.

    Save the form.

    11.

    Test the form.

    a.

    Switch to Formview.

    b.

    Enter the following data:

    Menu ID 11

    Meal Name Oatmeal Raisin Cookies

    Description Soft, chewy oatmeal and raisin cookies are

    flavored with just the right amount of

    brown sugar and cinnamon.

    Meal Type Dessert

    3-Serving Cost 5.846-Serving Cost 10.00

    Serving Size 2 cookies

    Calories 150

    Total Fat 66

    Sodium 182

    Cholesterol 29

    Total Carbs 25

    Protein 2

    Data Added to Menu 5/1/2014

    c.

    Use the navigation buttons to move back to the first record.

    d.

    Notice that the Deletebutton on the Hometab is not enabled.

    e.

    Click in the Meal Nametext box. Try to type in that field. Access should not allow you to make

    any edits.

    f.

    Close the form.

    12.

    Create a query and sort the query results.

    a.

    Create a new query in Designview.

    b.

    Add the Mealstable to the query and add the following fields into the query: MenuID,

    MealName, MealType, ServingSize, and Calories.

    c.

    Sort the query by the Caloriesfield in ascending order.

    d.

    Save the query asMealsByType.

    e.

    Run the query to confirm it displays the 11 records in ascending order by the Caloriesfield.13.

    Edit the query to add a parameter that allows the user to enter the meal type when the query runs.

    a.

    Switch back to Designview.

    b.

    Type [Enter the Meal Type]as the criterion for the MealTypefield.

    c.

    Save the query.

    14.

    Test the query to verify that it works.

    a.

    Run the query.

    b.

    TypeMain Coursein the Enter Parameter Valuedialog box, and click OK.

  • 8/10/2019 Access Integrated Project 1

    5/5

    Access 2013: In Practice Integrated Access Project 1 (Chapters 1-4) Page 5 of 5

    Figure 3 Query results when MealTypeparameter is used

    c.

    Verify that the datasheet shows the four records that meet the criteria (Figure 3).

    d.

    Close the query.

    15.

    Add the following database properties.

    a. Title:Magnificent Meals Product Database

    b.

    Author: Student Name

    c.

    Company:Magnificent Mealsd.

    Click OKto save the updated properties.

    16.

    Close the database.