To Homework

IT 240 -- Homework H6

A Sports League Database (continued)

Due date: Wednesday, May 28, 2008

Reference:   The Midwest League logo.


In this assignment you will expand your Midwest League database from H5.

A player draft is essential to the operation of the league. Players sign up for the coming season at registration, after which the coaches meet to select players for their teams. All players are rated as to ability, and the league strives to maintain a competitive balance among teams. This is accomplished through a draft in which the coaches take turns selecting players from the pool of unassigned players.

The Player Draft Form

Here are the steps you will need to complete in order to create the Player Draft Form:
  1. Create the Players Without Matching Teams query
  2. Create the Players Without Matching Teams form
  3. Create the Find Player query
  4. Create the Player Draft Macro Group
  5. Create the Player Draft form
  6. Modify the Player Draft form (that you created in Step 5).
    Appropriate headings. Delete labels. Resize controls. Make everything fit and look nice.
  7. Add the command buttons to the Player Draft form
  8. Modify the Main Switchboard
  9. Test the Completed Switchboard (AutoExec, Player Draft, Find Player, Close Form, End Draft, Teams command, Exit)
    Congratulations on a job well done!
The player draft is implemented through the Player Draft form, which is based on a query that identifies players who have not yet been assigned to a team. The easiest way to create the underlying query is through the Unmatched Query Wizard that identifies records in one table (the Players table) that do not have matching records in another table (the Teams table). The wizard prompts you for the necessary information, then creates the required query. (Steps 1 and 2)

The query is displayed within a form. The coaches will view the list of unassigned players during the actual draft and make the team assignments. A combo box within the query simplifies data entry in that a coach is able to click the drop-down list box to display the list of teams, rather than having to remember the TeamID. (Steps 2 and 3)

In addition to displaying the list of unassigned players, the form also contains three command buttons that are used during the player draft. The Find Player button moves directly to a specific player, and enables a coach to see whether a specific player has been assigned to a team, and if so, to which team. The Update List button refreshes the underlying query on which the list of unassigned players is based. It is used periodically during the draft as players are assigned to teams, to remove those players from the list of unassigned players. The End Draft button closes the form and returns to the switchboard. Note, too, that the appearance of the form matches the other forms in the application. This type of consistency is important to give your application a professional look. (Step 7)

Implementation of the player draft requires three macros, one for each command button. Although you could create a separate macro for each button, it is convenient to create a macro group that contains individual macros. The macro group has a name, as does each macro in the group. Only the name of the macro group appears in the Database window. (Step 4)

The Player Draft macro group contains three individual macros (Update List, Find Player, and End Draft), which run independently of one another. View the Macro Name column by clicking View menu >> Macro Names. The advantage of storing related macros in a macro group, as opposed to storing them individually, is purely organizational. Large systems often contain many macros, which can overwhelm the developer as he or she tries to locate a specific macro. (Step 4)

Access must still be able to identify the individual macros so the each macro can be executed at the appropriate time. For example, the full specification of of the Update List macro is Player Draft.Update List to indicate the Update List macro is in the Player Draft macro group. Each macro in the macro group corresponds to a command button in the Player Draft form.