Shelly Cashman Access 2019 | Modules 8-10: SAM Capstone Project 1a
Economic Development Conference
Macros, Navigation Forms, Database Administration, Using SQL
GETTING STARTED
Open the file SC_AC19_CS8-10a_FirstLastName_1
Subject:MS AccessPrice:19.99 Bought7
Share With
Shelly Cashman Access 2019 | Modules 8-10: SAM Capstone Project 1a
Economic Development Conference
Macros, Navigation Forms, Database Administration, Using SQL
GETTING STARTED
- Open the file SC_AC19_CS8-10a_FirstLastName_1.accdb, available for download from the SAM website.
- Save the file as SC_AC19_CS8-10a_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.
- The Economic Development Professional Organization hosts an annual conference for its members, college students, and other interested persons to share new ideas, discuss problems, and brainstorm solutions. You are a conference coordinator responsible for tracking registrations and for recording income based on advertisers, exhibitors, and sponsors.
Open the Preview Advertisers Contact Report macro in Design View. Change the View argument to Print Preview. Save the change to the macro, and then close the Preview Advertisers Contact 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 Attendees Table as the name for the submacro.
- In the first submacro, use the OpenTable action to open the Attendees table in Datasheet View and in Edit data mode.
- Add a second submacro to the macro, using Open Registration Table as the name for the macro.
- In the second submacro, use the OpenTable action to open the Registration table in Datasheet View and in Edit data mode.
- Save the macro using Open Tables as the macro name.
Confirm that your macro matches Figure 1, and then close the macro.
Figure 1: Open Tables Macro
- Open the EarlyRegistration table in Datasheet View and create a data macro for the table as follows:
- Click the Before Change button on the Table tools tab.
When the Macro window opens, enter the data macro shown below:
If [Paid]>[TotalFees] Then
SetField
Name [Paid]
Value = [TotalFees]
Else If [Paid]<0 Then
SetField
Name [Paid]
Value = 0
End If
- Confirm that the macro matches Figure 2. Save and close the macro, then save and close the EarlyRegistration table.
Figure 2: Data Macro for Before Change Event
- Create a Navigation form for the database with the following options:
- Use the Horizontal Tabs layout.
- Add the Advertisers, Exhibitors, and Sponsors Datasheet forms to the Navigation form in that order.
- Change the title (in the Form Header) using Main Navigation Form as the new title.
- Save the navigation form using Main Navigation Form as the form name.
Switch to Form View, and confirm that your form matches Figure 3. Save the form and close the Main Navigation Form.
Figure 3: Main Navigation Form—Form View
- Open the Advertisers form in Datasheet View and perform the following tasks to create a UI macro for the form:
- Select the AdvertiserID column.
- Click the Property Sheet button.
- Click the Build button for the On Click event and select Macro Builder.
- Create a macro that opens the Advertiser Master Form when a user selects a value in the AdvertiserID column. The macro actions are shown below:
SetTempVar
Name AN
Expression =AdvertiserID
OpenForm
Form Name Advertiser Master Form
View Form
Filter Name
Where Condition =[AdvertiserID]=[TempVars]![AN]
Data Mode
Window Mode Dialog
Remove TempVar
Name AN
Confirm that the macro actions match Figure 4. Save and close the macro, then save and close the form.
Figure 4: UI Macro Associated with On Click Event in the Advertisers Form
- Open the Main Menu Form in Layout View and perform the following tasks:
- Add the Forms List form to the Main Menu Form as the last horizontal tab.
- Rename the Forms List tab using Master Forms as the new name.
- Move the Sponsors tab so that it appears first in the list.
Switch to Form View, confirm that the form matches Figure 5, then save and close the form.
Figure 5: Main Menu Form—Form View
- Open the Open Master Forms form in Design View and add a command button to the form in the approximate position shown in Figure 6. The left-edge of the button is at the 2" mark on the horizontal ruler and the top-edge of the button is at the 2.5" mark on the vertical ruler. Ensure that Use Control Wizards is selected and use the following options when creating the command button using the Command Button wizard:
- Select Miscellaneous as the category and Run Macro as the action.
- Select Forms.Open Workshop Master Form as the macro.
- Select the Text option and enter Open Workshop Master Form as the text.
- Name the command button using Open_Workshop_Master_Form as the name.
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 actions:
- Select the three buttons on the form and use the Size/Space menu to adjust the size 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 buttons should be at the 2" mark on the horizontal ruler. The top-edge of the first button should be at the 1" mark on the vertical ruler. The right-edge of the buttons is at the 4" mark on the horizontal ruler.
Confirm that your form matches Figure 6. Save and close the Open Master Forms form.
Figure 6: Open Master Forms Form—Design View
- Open the database in Backstage View, and then click the View and edit database properties link. When the Properties dialog box displays, create a custom property for the database as described below:
- Create a custom property using Final as the name of the property.
- Select Date as the type.
- Enter 01/13/2020 as the value.
Confirm that your custom property matches the one shown in Figure 7. (Hint: Your database may contain other properties, depending on the version of Access used to open the file or the method by which the file was downloaded from SAM. Ignore these additional properties.)
Figure 7: Custom Properties Tab in the Properties Dialog Box
- With the database still open in Backstage View, click the Options tab. Select the Main Menu Form as the display form for the database, as shown in Figure 8. (Hint: The display form is sometimes referred to as the startup form.) Save the changes to the options. (Hint: When the Access dialog box appears and displays the message, "You must close and reopen the current database for the specified option to take effect.", click the OK button.).
Figure 8: Access Options Dialog Box
- Open the Attendees table in Design View, and then create a custom input mask for the AttendeeID field as described below:
- The AttendeeID field must consist of two letters and three numbers.
- All letters should display in uppercase. (Hint: Enter >LL999 as the input mask.)
- Save the changes to the table.
- With the Attendees table still open in Design View, create a single-field index on the LastName field. The index should allow duplicate values. Save the changes to the table design and then close the table.
- Open the Advertisers table in Design View and create a multiple-field index as described below:
- Name the index, using ContactName as the name.
- Use the ContactLName field, sorted in Descending order, as the first field in the index.
- Use the ContactFName field, sorted in Ascending order, as the second field in the index.
- Save the changes to the table design, and then close the table.
- Open the EarlyRegistration table in Design View, and then open the Property Sheet for the table and make the following updates:
- Create a validation rule for the table requiring that the Paid field value is always less than or equal to the TotalFees field value. (Hint: Enter [Paid]<=[TotalFees] as the validation rule.)
- Enter Paid cannot exceed TotalFees as the validation text.
Close the Property Sheet, save the changes to the table, then close the table. (Hint: Because there was a change to data integrity rules, the "existing data may not be valid" warning message will appear. Click No and continue saving the table.)
- Create a blank form based on the 1 Right application part. (Hint: The blank form will appear in the Navigation Pane as a forms object named "SingleOneColumnRightLabels" and is saved automatically.)
- With the Navigation Pane open, switch to viewing database items by the custom category named Supporter Information in the Navigation Pane. Add the Advertiser Master Form and the Exhibitor Master Form to the Supporter Information Forms group. Confirm the Supporter Information Forms group matches Figure 9.
- Add a new group to the Supporter Information category as described below:
- Name the new group using Supporter Reports as the name.
- If necessary, move the Supporter Reports group so that it appears between the Supporter Information Forms group and the Unassigned Objects group.
- In the Navigation Pane, add the Advertisers Contact Report to the Supporter Reports group in the Navigation Pane to match Figure 9.
Figure 9: Navigation Pane Viewed by Supporter Information Category
- Create a new query in SQL View based on the Workshops table:
- Add all fields from the Workshops table to the new query using the asterisk (*) in the Select clause.
- Be sure to end the SQL command with a semicolon (;).
- Run the query to produce the results shown in Figure 10. There should be four records in the result.
- Save the query using WorkshopQuery as the name, and then close the query.
Figure 10: WorkshopQuery Results
- Open the ExhibitorQuery in SQL View, and then add the ContactFname field to the SELECT clause (after the ExhibitorName field.) Run the query, and ensure that the results match those shown in Figure 11. There should be five records in the result. Save and close the ExhibitorQuery.
Figure 11: ExhibitorQuery Results
- Open the EarlyPaymentsQuery in SQL View. Add a computed field to the SELECT clause (after the Paid field) as described below:
- The computed field should calculate the remaining payment for the conference by subtracting the Paid field value from the TotalFees field value. (Hint: Enter TotalFees-Paid as the computation.)
- Use Remaining as the name (alias) for this computed field. (Hint: Use the AS clause.)
- Run the query and ensure that the results match those shown in Figure 12. (Hint: your records may be in a different order.) There should be 13 records in the result. Save and close the query.
Figure 12: EarlyPaymentsQuery Results
- Open the RegistrationCriteriaQuery in SQL View. Add a WHERE clause to the query as the third line in the query as shown in Figure 13 that restricts retrieval to those registrations where the RegistrationFee is less than 150. (Hint: Figure 13 demonstrates the proper location for the WHERE clause, but it does not show the criteria that should be included in the WHERE clause.) Run the query and check your results. There should be six records in the result. Save and close the RegistrationCriteriaQuery.
Figure 13: RegistrationCriteriaQuery in SQL View
- Open the AttendeeStatesQuery in SQL View. Add an OR clause to the WHERE clause in the query so that the query retrieves only those records in which the State field is equal to NY or MA. (Hint: Currently, the query only retrieves records where the State field is equal to NY.) Run the query, and ensure that the results match those shown in Figure 14. There should be six records in the result. Save and close the AttendeeStatesQuery.
Figure 14: AttendeeStatesQuery Results
- Open the RegistrationWorkshopQuery in SQL View. Add an AND clause to the WHERE clause in the query so that the query retrieves only those records in which the RegistrationFee field is equal to 175 and the WorkshopID field is equal to 1. (Hint: Currently, the query only retrieves records in which the RegistrationFee field is equal to 175.) Run the query, and ensure that the results match those shown in Figure 15. There should be two records in the result. Save and close the RegistrationWorkshopQuery.
Figure 15: RegistrationWorkshopQuery Results
- Open the MarylandCountQuery in SQL View. Modify the SELECT clause to count the number of attendees that are located in MD. (Hint: Change the SELECT clause to COUNT(AttendeeID).) Use the AS clause to set the alias of the function result to StateCount. Run the query and ensure that the results match those shown in Figure 16. The value in the StateCount column of the result should be four. Save and close the MarylandCountQuery.
Figure 16: MarylandCountQuery Result
- Open the JoinQuery in SQL View. Add a WHERE clause that joins the Registration table and the Attendees table. The common field in both tables is AttendeeID. You will need to qualify the AttendeeID field in the WHERE clause. Run the query and ensure that the results match that shown in Figure 17. (Hint: All rows are not displayed in the figure. The order of the records may differ. There should be 35 records in the result.) Save and close the JoinQuery.
Figure 17: JoinQuery Results
- Open the SponsorNameQuery in SQL View. Add a caption to the SponsorName field in the SELECT clause. (Hint: Use the AS clause.) Use FinancialSupporter as the caption for the SponsorName field. Run the query, and confirm that the second field in the query displays as FinancialSupporter, as shown in Figure 18. If necessary, enlarge the size of the caption so that the entire caption is displayed. Save and close the SponsorNameQuery.
Figure 18: SponsorNameQuery Results
- Open the SortQuery in SQL View. Modify the query to sort the records in ascending order by the AdvertiserName field. (Hint: Use the ORDER BY clause.) Run the query and ensure that the results match those shown in Figure 19. There should be seven records in the result. The advertiser on the first record should be Business Development Solutions and the last advertiser should be ProLogic. Save and close the SortQuery.
Figure 19: SortQuery Results
- Open the GroupingQuery in SQL View. Modify the query by completing the following tasks:
- Add the State field to the SELECT statement. The State field should appear before the COUNT(AttendeeID) function.
- Group the records by the State field.
- Sort the records in the State field in Ascending order.
Run the query, and ensure that the results match those shown in Figure 20. There should be 20 records in the result. Save and close the GroupingQuery.
Figure 20: GroupingQuery Results
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.
Instructions_SC_AC19_CS8-10a.docx
SC_AC19_CS8-10a_JACOBMASON_1.accdb