Information Technology in a Global Society
Databases: Part 6 Finishing your Application
Now you need to complete your database so that it looks good for your client.
Create the Welcome screen and have it open when starting the database.
You will create a form that can be displayed when the database is opened, as
a welcome screen.
- Open the school database.
- Click on form.
- Create form in design view.
- Resize your form and make it large enough to fill the screen.
- Change the background color to a dark green (for Kelly).
- Change the properties of the window so it can not grow or shrink.
- Put a large title in the window: Kelly High School and then
smaller underneath: Student Database.
- Change the properties of the form (and detail) so that all the
scrollbars and buttons are gone and the screen just looks like a big green
screen.
- Now, go to the menu Tools and select Start Up.
- Change the application title to Kelly High School Database.
- Set the display form to your new welcome screen.
- Close the database and open again to see how your screen works now.
- In the start up dialog you can also set which menus to show. You
can restrict your users to only seeing what you want them to see.
Add buttons for your forms and reports.
Now you can create a way for your users to navigate through your database.
- Open the school database.
- Click on the button in the tool bar. Click and drag to create a
button on your screen.
- A dialog box will open. Select Form Operation (you are
going to open a form) when the user clicks this button.
- Then select Open Form.
- Select the student form to be opened.
- On the next screen choose default.
- Then on the screen with Text: type in "Student Records"
That is the text that will be displayed on the button.
- In the final window give this button the name OpenStudents.
- Place your window in form view and test out your new button.
- Now add another button with the caption "Print Transcripts" That
button should open the transcript report. (select preview report)
More Customization.
Still, our application does not look like a custom application. It
looks too much like an Access database. So do the following to fix that.
- Open the school database.
- Open the welcome form in design view.
- We want the form to maximize when the database is opened so right-click
and select properties.
- Make sure you have the form properties (in the top drop-down you should
see form) selected.
- Click on Event tab.
- Click on OnOpen and hit the "..." button.
- When the dialog box opens select Macro Builder.
- You are specifying a list of commands to be run when the form is opened.
We only need one: maximize. So select that close this box and
you are done. Test it now by closing your database and opening the
database again.
- Close your database now. Make a copy of your database on
your network drive because some of these changes are not reversible.
- Now, go back to the tools menu and select Start Up...
- Click so that everyone of the check boxes is not checked. Make
sure not to save this unless you have a copy.
- Close your database and make a shortcut of the database file. Copy
that shortcut to the desktop and name "Kelly High School Database".
- Now double-click on that shortcut to see what your user will see when
opening the database.
Add student Search.
What if you had 3000 students in your school. It would be hard to find
a particular student. We will add some functionality for that.
- Open the school database (the copy before you took out the tool bars and
menus).
- Open the welcome form in design view.
- Click on the combo box in the tool box and click and drag a combo box
into your form.
- When the wizard opens hit next (first default is correct).
- On the next screen select table student.
- On the next screen select fields IDNumber and studentName.
- Sort by student name and hit next until finished.
- Test your new combo box. Try using the drop down or typing in part
of a student name.
- In practice, you would need more than the student name for a student.
Usually we search by name and division.
- So far you have no action associated with this selection. So add a
button on the screen right next to the combo box.
- In the button wizard select form operation and open form.
- Select the student form.
- Now, select the button "Open form with specific data to display"
since we want to pick a particular student's record.
- In the left column click on your combo box. In the right select
IDNumber. Then it the <--> button.
- Click next until finished. Try out your new box and button.