You need to use what you just learned and what you learned in the previous project, and maybe learn a little more. The exercises with databases will require more steps than in the other lessons!
Complete all parts of the following exercises. Don't forget to backup your Class disk when you have completed the exercises or whenever you stop for the day and saved a document along the way.
| What you will do: | Create data entry form Create a query to use as row source for form Create form based on Crosstab query Create form for printing Create form with subform Create report with groups Edit an existing report to show different data Create a report with Totals Create a chart report Create a report with a subreport |
Some years ago when I was the Service Unit Manager (head local volunteer), I created a database for managing the Girl Scout troops and leaders in our service unit. I have reduced the number of records and objects and have somewhat normalized the database for use here. I have learned more over the years about how this should have been done to start with!
You will create forms and reports that use the tables and queries that you previously imported to create a new database (Exercise Access 3-3).
Disclaimer:
All of the names, phone numbers, and addresses are fictional and any
correspondence to actual persons is coincidental. Girl Scouts of the
USA has not approved this database in any way.
Start with: ex3-3-scouts-Lastname-Firstname.accdb from your Class disk
Open ex3-3-scouts-FirsnameLastname.accdb from the databases project3 folder of your Class disk.
Run the query to make sure your expression creates the full names. Note that the Adult Info table puts a space between words in field names!

On the Format tab for the ADULTID control, change the property Column Count to 2 and the Column Widths to 0";1".The AdultID control is now a drop list. The Event control was already a drop list because it is a Lookup field in the table's design.
Use your new form to add a set of records for a First Aid training on 11/18/2006, attended by Jan Smith, Cindy Brown, Carolyn Roberts, Lillian Felton, Jan O'Flannery, and Karen Trapp.
Tip 1: AutoFill
The combo box
controls will autofill as you type. (Names are listed with the last
name first in ADULTID). Just type the first letter of the last name that
you want and then the next letter... until you see the correct name. Then press the ENTER key to accept that name and move the focus to the next field.
Tip 2: Duplicate values
with key combo
When a sequence
of new records shares some of the same data, like the Date and Event for
this exercise, you must actually enter all of the values only for the first
new record. For the remaining records, where data is the same as the
previous record, just click in the
text box and use the key combo CTRL + ' (That is, hold the CTRL
key down and press the apostrophe key). The data from the preceding
record is copied into the control.
Inspect and run this query.
What does it do? It shows us the most recent date (Max function) that a leader or coleader took a training course. (Position Code less than 990 means the person is still active). Rows show the leader's last and first name. Columns show the training event. The cells in the middle show the latest date that the person took that kind of training.
If your query shows Expr1 or similar, you can delete those characters, leaving the original field names. If your tables show _1 at the end of the name, that is not a problem. That happens when you have two or more copies of the same table in the grid.
Layout: Remove the Stacked Layout (if the control are in this layout). Rearrange the controls in a layout of your own choice to put the trainings into 3 groups - Basics, Skills, Positions. Label your groups.
Basics: (usually taken in the following order) Orientation, Adult, age-level trainings (Daisy, Brownie, Junior, C/S), Intro to the Outdoors, Basic Outdoor Skills, CPR, and First Aid.
Positions: Training for particular adult-level jobs.
Skills: Training for particular kinds of
activities like Service Projects and Crafts, Songs and Games, Project Wild.
Date Picker: When the focus is in a date field, the Date Picker pops up. Click on it and a calendar opens. Since this form cannot edit data, select all of the date controls and set the Show Date Picker property to Never in the Property Sheet.Below are some example layouts. Your form is allowed to look different from the illustrations but should include the same kinds of groups. How pretty do you want to get??
The first form below is a rearrangement of what the Form Wizard produced with some rectangles in the back to group controls together more clearly.
The second version includes a calculated control at the top which pulls the person's name together. So much easier to read than the two separate controls at the top. Lines divide the trainings into groups. The vertical line is actually a narrow rectangle.
Examples of formatted form:


You will now revise the form to print a copy of the results to give to leaders for them to use to verify the training taken. You need each record to print on a separate page.
Make changes to the new form as needed so that it will print neatly,
without any backgrounds for the sections. Set the background color for the small fire and red cross images to the same as whatever background they are on. Even though those images have a transparent color, when printed, Access may put a white background in that area. Not what is supposed to happen!
(Your form may look quite different from the illustration!)
The Form Header prints only once, so you should move the title and the label with your name to another section, either the Page Header or at the top of the Detail section for the new form, if your layout prints with one record on each page.
Add directions and a place somewhere on the form to sign. The directions should say to verify the training taken or make corrections and then to sign the form and return it to the Service Unit Manager.
Examples:

The three groups of training events could be put on tab pages to save a lot of space. For some purposes a tabbed control would make the form more awkward to use. For example, it won't print well at all!
Copy the Leaders Trained In? form and name the
copy Leaders Trained In? - tabbed.Cut and Paste the training controls to the appropriate tab page.
(Your form may look different from the illustration!)
Be careful that you move the controls to the tab page and not UNDER the tab page! Remember that you have to select the page by clicking near the edge but not the tab control itself.
Save the form.
[Leaders Trained In? - tabbed]
Add a subform based on your new query to show the Troop
Info for that person's troop(s).
The field AdultID does not really need to be
on the subform, but the Position Code does.
(If you use the Troop Info table
instead of the query, you will see all troops, not just the ones that
match the leader.)
Make the following changes to the subform:
The illustration shows the form what the Form button produces, with the default subform changed to show form view, to show only the current position code instead of a list, and to remove AdultID from the subform.
New leaders must take several trainings before starting to work with the girls. You will create a report that lists who has taken a training, grouped by date. This amounts to an attendance list of the event.
In
the Report Header, add the title "Orientation Taken" and
the current date, centered on the 4" grid line. Center both inside their controls.
Showing the date on which the list was printed can keep you from using a stale report.
Format with the font, font size (at least 26 pt), color, and background of your choice. (The illustration uses the font Renfrew, which is not a font included with Windows or Office.)
Increase the font size for the group header and the names in the Detail section to 14 pts. Align the date to the left.
Modify
ReportYou can change the existing report to show another training list. You just have to change the source and the title. The formatting and layout are all done! be sure that the new records you entered for 11/18/2006 show up!
One question asked every year is "How many girls do we have in troops?" A related question is "What percentage of the girls are in each age-level?" You will create a report to answer both of these questions at once.
In
the Report Header, create a title label, Girls in
Troops, by Age Level and a control for the current date at the left. In the Age Code Header, add a control for Age-Level.
This will work since there is exactly one Age-Level
for each Age Code. Keep whole group together.
Note: By using codes in addition to the names of the age levels, we
can set up the sort order that we want. Daisies are the youngest. Then
Brownies, Juniors, Cadettes, and Seniors. Not regular alphabetical
order!
Make changes to the formatting as you wish to make this report easy to read. Make sure it is easy to tell the totals from the the other numbers.
Examples:

Your report does not have to duplicate the example illustrations.
Select the chart and open the Query Builder for the chart's
Row Source.
Save the changed query to the report, not as a separate query.Now you can put the chart into the report header for the report Total Girls in Troops, by Age Level. Because we carefully managed the columns and size of the chart, all should still fit on 1 page.
(Yes, we did not have to use a subreport at all. But having this chart available in a subreport gives you the option of including it in other report, without having to create it every time.)
Delete the label for the subreport and center the subreport in the enlarged Report Header.
With the chart added, the report may get a second page, depending on your spacing and font sizes.
If necessary, edit the report font sizes and spacing to get all of the report onto one page. The Report Footer should already have height of 0". Do not change the size of the chart. Keep the report width 6.5" and all of the margins 1".
If necessary, adjust the position of the original chart in its report to leave no space around it. Adjust the size and borders of the chart control in the master report so that there is only one border around the chart and no extra white space.

Remember - you were given a freer hand in creating the forms and reports for this exercise. Yours should not be exactly like those of other members of your class or the illustrations!