|
The information in your database is held in tables, although you will usually not allow users to get access to these tables. The table is therefore the most principal means of data entry. To better appreciate what your users will face when using your product, we will learn how to use tables from the user's standpoint. Then we will learn how to use forms.
Computer Regional Settings
Your computer controls how it is supposed to display some pieces of information such as date and time values. These also affect internal settings of your databases and other programs you use on your computer.
To view, control or set these properties, you use the Regional Settings dialog box from Control Panel. |
Practical Learning: The Computer Regional Settings
|
- To review these settings, click Start -> Settings -> Control Panel
- From the Control Panel window, double-click Regional Settings
- Click each of the property sheets: Number, Currency, Date, Time and review your computer's settings. I recommend that whenever have any doubt with the dates you are typing or the way the database displays them, change or play with your Short Date Style and the Long Date Style, and test your database until you are comfortable.
|
|
Data is entered in a table by typing it into cells. Some fields can be configured to accept some forms of data and reject others. And some fields would allow anything. This depends on how the database was setup.
A table's cell holds one particular unit of data, usually considered as a category. All cells on the same (vertical) column belong to the same category of information. The horizontal range of cells is called a record; and all cells on this range belong to the same record.
After typing data into a cell, you can press Enter or Tab to move the cursor to the next cell. In many circumstances you will also be able to move to the next cell by pressing the right arrow key. Sometimes you can move the next record even if the current record is not completed. In this case, you could press the down arrow key.
There are three kinds of fields or cells the user will face: a field where the user can type data, a field that displays a list as a combo box the user has to select from, and a field that doesn't receive input from the user. The latter is usually set for an AutoNumber data type: the database itself keeps track of the numbers. If you as the user have to select from a list, click the field that holds the list and select from the combo box; there are two kinds of combo boxes, those that accept new entries from the user and those that allow only a selection from a preset list. The classic field allows the user to just type the appropriate data in a field.
After setting the data in a particular field, click another cell and type the desired data. The easiest way is to press the right arrow key to move to the next field or the left arrow to move to the previous field, pressing Enter would work as well.
Data on the same row represents a record. Data on the same column represents a category. After typing data, if you press Enter at the end of a record, the cursor would move to the beginning of the next record. At anytime, you can press the up arrow key to move to the same category field of the previous record. If you press the down arrow key, the next same category of the next record will receive focus.
|
Practical Learning: Table's Data Entry
|
- Open the Music Collection1 database
- On the Database Window, click the Tables button.
- Double-click tblMusicCategories to open it.
- Press Tab to move the cursor to the next empty field.
- Type Rock and press Enter twice
- Type R & B and press Tab twice
- Type New Age and press the down arrow key
- Type Reggae and press Enter.
- To close the table, click its Close button
.
- On the Database Window, right-click tblMusicAlbums and click Open
- Perform data entry, skipping other fields.
- To close the tblMusicAlbums table, click its Close button
.
- To print data on the table, right-click tblMusicAlbums and click Print from the context menu.
- Click OK to print.
- Open the Rockville Technologies database. If the Database Window is minimized, press F11 to display it.
- On the Database Window, click the Tables button
- Double-click Payment Methods and complete it as follows
| Payment Method ID |
Payment Method |
Credit Card? |
| 1 |
Check |
No |
| 2 |
Cash |
No |
| 3 |
Money Order |
No |
| 4 |
Visa |
Yes |
| 5 |
Master Card |
Yes |
| 6 |
American Express |
Yes |
- To close the Payment Methods table, click its Close button
.
- Double-click Employees and perform data entry, skipping other fields (close the table after performing data
entry).
- Close the table after performing data entry.
|
|
The primary function of the table is to provide a
logical structure of the database. But you can print data on the table,
especially if either you don't have appropriate reports available or you
are in a hurry.
You can print data on a table whether the table is opened or not. To print
a closed table, locate it in the Database Window. Then right-click the
desired table and click Print. Once a table is opened in Datasheet View,
on the Table Datasheet toolbar, click the Print button. This will send all
the records of the table to the printer for printing. If you want to
control the printing process, instead of using the Print button, on the
menu bar, click the Print button. |
Practical Learning: Printing A Table
|
- To print data on the table, on the Table Datasheet toolbar, click
the Printer button.
- To close the current table, click its close button .
- To print a list of music categories, right-click tblMusicCategories
and click Print
|
|
Form Layout And Data Entry
|
|
|
A form in Microsoft Access is a special window. Microsoft Access as an application is an MDI that allows you to open many objects, such different forms at the same time. This is even more significant with Microsoft Access 2000 as opposed to Microsoft Access 97. A dialog box in the strict sense of windows applications would not allow you to use the main application when this kind of dialog box is displaying. For example, in WordPad, if you are using the Font dialog box, you cannot type on the document until you have finished dealing with the Font dialog. By default, a dialog box would not allow you to work on the same application before dismissing the dialog box. Such a dialog box is said to be a modal dialog box: when such a dialog box is displaying, you cannot work on the main application. A second kind of dialog box would allow you to work on another form behind it, keeping this second dialog in front. Such a dialog box is said to be a modeless dialog box. An example of a modeless dialog is the Find dialog box found on most applications such as Notepad, WordPad, Microsoft Word, etc (to get the Find dialog box on any of these applications, on its main menu, click Edit
-> Find
)
Data entry on a form is different from that of a table. A form, by design provides a friendlier interface and should make its navigation easy for the user.
|
 |
Labels
A form is made of various special objects called windows controls. A word or group of words on a gray background, as illustrated on this form, is called a label.
Text Boxes
A box with a white background and thick borders is usually referred to as a text box. A text box is named after the label on its left.
Combo Box
A combo box is a particular text box that displays an item selected from a list this special box is holding. To change an item in a combo box, click its arrow and make your selection from the list. Although it depends on the programmer's configuration of the combo box, you are usually not allows to entered in a combo box something that is part of the preset list.
Subform
A subform is a child form in the parent form. It is used to display related data that would otherwise be accessible from another form.
Record Selector
A form is equipped with a special area that allows selecting the currently displaying record. The Record Selector is on the left side immediate to the left border of the form. The Record Selector is not available on all forms. The database developer decides on its availability or not.
Navigation Buttons
A form is equipped with the same navigation buttons we have used on tables and queries. This time, they are used to navigate left and right to the previous or the next records instead of up and down.
Navigation Among Fields
Data entry on a form is performed inside of text box, combo boxes, and other controls. To move from one field to the next, after performing the necessary change, the surest way is to press Tab. On most occasions, you can also press Enter. The Enter key will not move the cursor from a box configured with a Memo data type. Since the Memo data type allows to type long documents that include hard returns (Enter key), the field will behave as if you are just trying to get to the beginning of the next line. If you are simply reviewing data without performing data entry, the keyboards arrow keys can also be used to move among fields.
Besides the Tab key, the other safe but quickest way to move among fields is by clicking in the desired field.
|
Practical Learning: Form Data Entry
|
- The Rockville Techno database should still be opened.
On the Database Window, click the Forms button.
- Double-click Switchboard.
- On the Switchboard, click Enter/View Other Information
- Click Enter/View Employees
- Complete each record by clicking in the appropriate field and typing the corresponding
data (after each record, click the Next Record button
):
| Last
Name |
Address |
City |
State |
| Phillips |
10048 Venice Drive |
Bethesda |
MD |
| Nice |
442B Junta Cart |
Chevy Chase |
MD |
| Borough |
9677 Old Virginia Rd |
Hyattsville |
MD |
| Barley |
528 Indian Terrace SE |
Washington |
DC |
| Vaughn |
5404 Pulitzer Drive |
Arlington |
VA |
| Kumar |
402 East Annapolis Rd |
Silver Spring |
MD |
| Monayong |
12402 Rockwood Drive |
College Park |
MD |
| Lamard |
6205 24th St #812 NW |
Washington |
DC |
- Close the table after performing data entry
- Click Enter/View Expense Codes
- In the first Expense Code, type Office Supplies
- Press Enter
- Type Software and press Enter
- Type Printer and press Enter
- Type Computer Supplies and press Tab
- Type Car Rental and press Tab
- Type Air Fare and press Tab
- Type Meal
- To close the form, click the Close button
.
- On the Forms Switchboard, click Enter/View Work Codes
- In the first Work Code, type Regular
- And press Enter
- Type Web Design and press Enter.
- Type Data Entry and press Tab
- Type Database Design and press Tab
- Type Software Coding
- To close the form, click its close button
.
- On the Forms Switchboard, click Return To Main Switchboard.
- Click Enter/View Clients
- In the First Name text box, type Jose and press Enter
- In the Last Name text box, type Marillo and press Enter
- In the 8012 Herald Ave Suite 402 and press Enter
- In the City text box, type Alexandria and press Tab
- In the State/Province text box, type VA and press Tab
- In the Postal Code text box, type 22031 and press Tab
- In the Country text box, type USA
- Click in the Company Name text box and type PTN Investors, Inc.
- Click in the Contact Title text box and type Director of Investments and press Tab.
- In the Phone Number text box, type 7038384422 and press Tab
- In the Fax Number, type 7038385035
- Click in the Notes text box and type PTN is an investment firm with offices in VA, MD, and NY and is interested in network technology for its future activities.
- Click the Projects button. This opens the form allowing to process projects related to this client.
- In the Project Name text box, type PTNC01
- Click the arrow of the Project Manager combo box and select Phillips, David
- Click in the Client PO# text box and type 1
- In the Project Description text box, type PTN has contracted us, for one year, to provide part-time technical support for its existing computer network. We will be in their office every Wednesday all day long.
- In the Est. Total Billings text box, type 16250 and press Tab
- In the Project Begin Date, type 031898 and press Tab
- In the Project End Date, type 031899
- To close the form, click its Close button
.
- On the Clients form, click the Time Cards button.
- Click the arrow of the Employee combo box and select Phillips, David
- Select the date in the Date Entered text box, type 031898 and press Tab.
- In the Date Worked text box, type 031898 and press Tab.
- Click the arrow of the Project combo box, select PTNC01 and press Tab.
- Click the arrow of the Work Code combo box, select Regular and press Tab twice.
- In the Billable Hours field, type 8
- In the Work Description field, type Besides regular work, I replaced 2 network cards on the receptionist and Ms. Maureen's workstations.
- Press Tab to move to the next record of the subform.
- For the next record, set the Date Worked to 032598 for the PTNC01 project on Regular work billable for 6 hours. For the Work description, type I spent some time with Helene Nice training her on mild issues of computer networking.
- In the Expense subform, click the Date field.
- Date 031898 and press Enter
- On the Project combo box, select PTNC01 and press Enter
- Click the Expense Code combo box and select Computer Supplies.
- Click the Amount field and type 386.10
- Click the Description field and type I bought 5 network cards. Two were used right away. The spare are kept just in
case.
- Click the Next Record button
.
- On the Employee combo box, select Helene Nice.
- Replace the Date Entered with 032598.
- In the Time Worked combo box, click the 1st empty field and type 032598
- Select the Project Name as PTNC01
- Set the Work Code to Regular. Set the Billable Hours to 6
- In the Work Description, type I spent a couple of hours on site with Mr. Phillips.
- To close the form, click its Close button .
- On the Clients form, click the Payments button.
- Click the arrow of the Payment Method combo box, select Check and press Tab.
- In the Payment Date, type 030498 and press Tab.
- In the Payment Amount text box, type 8600 and press Tab
- To close the Payments form, click its Close button
.
- On the Clients form, click Projects to review its form.
- Close the Projects form.
|
|
Although not part of their primary role, forms provide a quick means of
printing your data, especially in the absence of appropriate reports. There are various issues related
to printing forms, including printing all records or just some of them.
You can print a form without opening it. Once you know the form you would like to print, locate its name in the Database Window, right-click its name and click Print. All records on the form will be printed.
When a form is opened, you have to option of printing all its records or the selected one. Once in Form View, click the Print button on the toolbar. To print just one record, navigate to the record you would like to print, click the Form Selection bar to select the record. On the Form View toolbar, click the Print button. |
Practical Learning: Printing A Form
|
- The Clients form should still be opened.
Click the Projects button to open the associated projects. Since we have only one project from this client, we will just print that record.
- On the Form View toolbar, click the Print button
. Notice that the job goes straight to the printer and starts printer.
- Close the Projects form and close the Clients form.
- On the Main Switchboard, click Enter/View Other Information
- Click Enter/View Employees
- To locate the 4th employees, click and select the content of the Record Number text box, type 4 and press Enter
- After making sure that the desired record is displaying, in this case, the 4th record, on the menu bar, click File
-> Print
- On the Print dialog box, click the Selected Record radio button
- Click OK.
- Verify that only the displaying employee's record was printed.
- Now we will print records from 2 to 5.
Navigate to record No.2.
- Click the Record Selector bar.
- Press and hold Shift. Click the Next Record button a few times until the record of Lester Vaughn displays (even though the record # still displays 2).
- Release Shift.
- On the menu bar, click File -> Print
- On the Print dialog box, click the Selected Record(s) radio button.
- Click OK.
- Verify that records from 2 to 5 have been printed.
- Close the Employees form.
- Close the Switchboard form.
- Press F11 to maximize the Database Window
- To close Microsoft Access, press Alt + F4.
|
Table: Music Album Data Entry
| Table:
Music Album Data Entry |
| Album ID |
Album Title |
Label |
© Year |
Format |
Tracks |
Notes |
| 1 |
Tribute |
Virgin |
1997 |
CD |
11 |
Mix of live music and studio recording. |
| 2 |
Everlasting Love |
Siren Records |
1988 |
CD |
10 |
Angel-like voice |
| 3 |
Bona Fide |
Ten Records |
1990 |
CD |
12 |
One of the best |
| 4 |
Folon
The Past |
Island Records |
1995 |
CD |
9 |
Powerful stuff |
| Rockville
Techno Employees |
|
First Name |
Last Name |
Title |
Extension |
State |
Postal Code |
Country |
Home Phone |
Work Phone |
Billing Rate |
| David |
Phillips |
Owner |
102 |
MD |
20854 |
USA |
(301) 953-2196 |
(301) 869-9814 |
32.18 |
| Helene |
Nice |
Admin Assistant |
105 |
MD |
20872 |
Ctrl + ' |
(301) 840-9333 |
Ctrl + ' |
10.65 |
| Cynthia |
Borough |
Webmaster |
106 |
MD |
20704 |
Ctrl + ' |
(301) 622-0300 |
Ctrl + ' |
10.82 |
| Christine |
Barley |
Admin Assistant |
100 |
MD |
20008 |
Ctrl + ' |
(202) 667-0455 |
Ctrl + ' |
12.44 |
| Lester |
Vaughn |
Network Admin |
101 |
VA |
22031 |
Ctrl + ' |
(703) 790-5920 |
Ctrl + ' |
20.12 |
| Joseph |
Kumar |
Network Admin |
108 |
MD |
20904 |
Ctrl + ' |
(301) 890-6100 |
Ctrl + ' |
20.65 |
| Gertrude |
Monayong |
Accountant |
104 |
MD |
20707 |
Ctrl + ' |
(301) 469-2100 |
Ctrl + ' |
16.74 |
| Paul |
Lamard |
Programmer |
103 |
DC |
20004 |
Ctrl + ' |
(202) 537-9551 |
Ctrl + ' |
20.54 |
| |
|