Shelly Cashman Access 2019 | Module 8: SAM Project 1b
City Tours Ltd
Subject:MS AccessPrice:19.99 Bought3
Share With
Shelly Cashman Access 2019 | Module 8: SAM Project 1b
City Tours Ltd.
MACROS, NAVIGATION FORMS, CONTROL LAYOUTS
GETTING STARTED
- Open the file SC_AC19_8b_FirstLastName_1.accdb, available for download from the SAM website.
- Save the file as SC_AC19_8b_FirstLastName_2.accdb by changing the “1” to a “2”.
- If you do not see the .accdb file extension in the Save As dialog box, do not type it. The program 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
- City Tours Ltd. is a company that provides tours in a city that attracts tourists from around the country. As the customer service manager for the company, you need to be able to access forms and reports by simply clicking tabs and buttons, rather than using the Navigation Pane.
Open the Preview Basic Guide List macro in Design View. Change the View argument to Print Preview.
Save the change to the macro, then close the Preview Basic Guide List macro.
- The Open Guide Skills Report macro contains an error. Complete the following tasks to correct the macro:
- Open the Open Guide Skills Report macro in Design View.
- Click the Single Step button.
- Run the macro.
- Correct the error. (Hint: The macro should open the Guide Skills Report in Report mode.)
- Click the Single Step button again to deselect it.
Save and close the Open Guide Skills Report macro.
- Create a new macro with two submacros by following the directions below:
- When the Macro Design window opens, display the Action Catalog.
- Add the first submacro to the macro, using Open Customers Table as the name for the submacro.
- In the first submacro, use the OpenTable action to open the Customers table in Datasheet View and in Edit data mode.
- Add a second submacro to the macro, using Open Confirmations Table as the name for the macro.
- In the second submacro, use the OpenTable action to open the Confirmations table in Datasheet View and in Edit data mode.
- Save the macro using OpenTables as the macro name.
Confirm that your macro matches Figure 1, and then close the macro.
Figure 1: OpenTables Macro
- Open the SegwayTours table in Datasheet View, and then create a data macro for the table by completing the following tasks:
- Click the Before Change button on the Table Tools tab.
- Create the macro shown in Figure 2.
Save and close the macro and then save and close the SegwayTours table.
Figure 2: DataMacro for a Before Change Event
- Create a Datasheet form based on the Guides table, and then save the form using the default name Guides as the form name. Close the form.
- Create a Navigation form for the database with the following options:
- Use the Horizontal Tabs layout.
- Add the Customers, Confirmations, and Tours Datasheet forms to the Navigation form in that order.
- Change the title (in the Form Header) using Basic Navigation Form as the new title.
- Save the Navigation form using Basic Navigation Form as the form name.
Confirm that your form matches Figure 3. Save and close the Basic Navigation Form.
Figure 3: Basic Navigation Form in Layout View
- Open the Customers form in Datasheet View, and then complete the following tasks to create a UI macro for the form:
- Select the CustomerID column.
- Click the Property Sheet button.
- Click the Build button for the On Click Event, and then select Macro Builder.
- Create a macro that opens the Customer Master Form when a user selects a value in the CustomerID column. The macro actions are shown in Figure 4.
Save and close the macro, and then save and close the form.
Figure 4: UI Macro Associated with On Click Event in the Customers Form
- Open the Main Menu Navigation Form in Layout View, and then complete the following tasks:
- Add the Forms List form to the Main Menu Navigation Form as the last horizontal tab.
- Rename the Forms List tab using Master Forms as the new tab name.
- Move the Customers tab so that it appears first in the list.
Confirm that the form matches Figure 5, and then save and close the form.
Figure 5: Main Menu Navigation Form in Layout View
- Open the Open Master Forms form in Design View, and then add a command button to the form in the approximate position shown in Figure 6. The left-upper edge of the button is at the 2" mark on both the horizontal and vertical rulers. Use the Command Button wizard to create the command button while incorporating the following options:
- Select Miscellaneous as the category and Run Macro as the action.
- Select Forms Macro.Open Tours Update Form as the macro.
- Select the Text option, and then enter Open Tours Update Form as the text.
- Use Open_Tours_Update_Form as the name for the command button.
Save the changes to the form but do not close it.
- With the Open Master Forms form still open in Design View, complete the following tasks:
- Select the three buttons on the form, and then use the Size/Space menu to adjust the size to To Widest.
- Use the Size/Space menu to adjust the spacing of the button controls to Equal Vertical.
- Align the buttons to the Left. The left-edge of the three buttons will be at the 2" mark on the horizontal ruler. The right-edge of the buttons will be at the 4.1" mark on the horizontal ruler.
Confirm that your form matches Figure 6, and then save and close the Open Master Forms form.
Figure 6: Open Master Forms Form in Design View
- Open the Guides Layout Form in Layout View, and then modify the form to match Figure 7 by completing the following tasks:
- Select the cell containing the value for the FirstName field, and then split the cell horizontally.
- Delete the LastName label.
- Move the cell containing the value for the LastName field to the position shown in Figure 7 (to the right of the FirstName field in the cell created in Step 11a).
- Change the FirstName label using Guide Name (including the space) as the new label name as shown in Figure 7.
- Move the HourlyRate label and HourlyRate field value to the position shown in Figure 7 (immediately below the GuideID field and field value.)
- Select the control layout for the form and then change the control margins to Medium and the control padding to Narrow.
Save and close the Guides Layout Form.
Figure 7: Guides Layout Form in Layout View
- Open the HomeTours and Customers Tabular Report in Layout View. Select the control layout, and then change the report layout to Stacked as shown in Figure 8.
Save the change to the report and close it.
Figure 8: HomeTours and Customers Tabular Report in Layout View
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.