Database Reference
In-Depth Information
ADDING FIELDS TO A TABLE IN A WEB DATABASE
You
ll create the Rep table first, using the Rep Fields data type that you created. To add all the fields
corresponding to a data type, click the More Fields button (Table Tools Fields tab | Add & Delete group) to
open the More Fields gallery, as shown in Figure E-13. You then click the data type
'
'
s name to add its fields
to the table design.
378
More Fields
button
Quick Start ields
User Deined Types
FIGURE E-13
More Fields gallery
In the following steps, you will create the fields in the Rep table using the Rep Fields data type. You
'
ll
designate the RepNum field as both required and unique. This way, Access will require users to enter a
unique rep number for each record, even though the ID field, and not the RepNum field, is the table
'
s pri-
mary key. After adding the fields, you
'
ll save the table.
1. Click the More Fields button (Table Tools Fields tab | Add & Delete group) to open the More
Fields gallery.
2. In the User Defined Types section, click Rep Fields. The RepNum, LastName, FirstName, Street,
City, State, Zip, Commission, and Rate fields are created in the table.
3. Click the RepNum field to select it, click the Required check box in the Field Validation group
to make the field a required field, and then click the Unique check box in the Field Validation
group so that Access will only store unique values in the field.
4. On the Quick Access Toolbar, click the Save button, type Rep in the Table Name box, and then
click the OK button.
5. Close the table.
RELATING THE TABLES IN A WEB DATABASE
Access created the first table in the Web database for you automatically. To create an additional table, click
the Table button (Create tab | Tables group). Remember that you must create lookup fields to relate the
tables in a Web database. In the Reps and Customers database, the Rep and Customer tables are related
using the common RepNum field, so you must create the RepNum field in the Customer table as a lookup
Search WWH ::




Custom Search