Tables:
Titles: like Mr. Mrs, Dr. Fr. Sr. etc, to be prefixed to the First Name. To be selected through a combo box, with the help of a Look Up wizard.
Person's Name:
ID, First Name, Last Name, Telephone Number - use input mask, Postal address, zip code, etc. Choose the fields you may need.
You can use a Options Group form, to get to the person's record.
Create a macro, so that by clicking on the line of the person's name, you can access the full record of the person.
Make a printed list of the telephone numbers.
Check for database samples in the MS Access pack. They supply many sample programs, from where you can copy the macros, and table structures, and learn how the forms have been designed.
Telephone Book.
Table 1
Field Name | Data Type | Notes |
ID | Autonumber | Primary Key |
Title | Number | LookUp combo box |
Firstname | Text | ` |
Lastname | Text | |
Telephonenumber | Text | with input mask |
mobile | Text | with input mask |
address1 | text | |
address2 | text | |
City | text | |
Zipcode | text | with input mask |
Remarks | memo | unlimited space |
Table 2 for table 1, as combo box.
Fieldname | Datatype | notes |
ID | autonumber | Unique |
title | text | |
Query 1
Create a new Query.
Add Table 2 as source.
Drag into the boxes below, the two field, ID and title.
Save as query1
Open the Table 1
Place the mouse on the row Title.
In the box below, flick on LookUp and open the box. Display Control: Combo Box
Reow Source: Table/Query
Row Source - click the downarrow and select query8
Bound Column - 1
Count Column - 2
Column Heads - No
Column Widths: 0";2"
Rest leave as it is. Save the Table.
When you view it in data view, you will find a drop down box in title and showing the different titles.
Be shure to update the Titles, before entering Table 1.
Note Column Widths: is measured in inches or centimeters as set in tools/options. It comes automatically. In case you want one in preference to the other, change the tools/options parameters.
0" is followed by a semicolon and then the width of the second field. These are the ID and Title, which were chosen in the query. Since we have given the data type of Title as number, we choose the ID, and te title appears as the second row. The first ID is blanked, as we have given the width, 0"
This field could have been generated at the time of making table 1, if after the ID field, we clicked on Insert in the Menu Bar and chosen LookUp Field. For details on how to do it, look at the main lesson.
By clicking on the icon for Auto Form, you can create a new form, to input data. It will sow that the table is open. However, save it and after the table is closed open the form again.
< Prev |
---|