Database Reference
In-Depth Information
6. Make sure that the I want the lookup field to get the values from another table option button is
selected, click the Next button, and then if necessary, click Table: Rep to select it.
7. Click the Next button, and then double-click the RepNum, FirstName, and LastName fields in
the Available Fields box to move them to the Selected Fields box. These fields will be used as the
columns in the lookup field.
8. Click the Next button, click the arrow, click the RepNum field for the sort order, and then click
the Next button.
9. Make sure that the Hide key column (recommended) check box is selected, and then click the
Next button.
10. Type RepNum as the label for the lookup field, click the Enable Data Integrity check box to
select it, and then click the Finish button to create the lookup field.
11. In the Save As dialog box, type Customer in the Table Name box, click the OK button, and then
close the table.
381
IMPORTING DATA INTO THE TABLES
Now that you have created and related the tables, you can import the data into them using the text files
included with your Data Files. The following steps import the data.
1. Click the Text File button (External Data tab | Import & Link group) to open the Get External
Data
Text File dialog box.
2. Click the Browse button, and then browse to and select the location where your Data Files are
stored. Click the Rep text file, and then click the Open button.
3. Click the Append a copy of records to the table option button, click the arrow, click the Rep
table, and then click the OK button. The Import Text Wizard dialog box opens.
4. Make sure the Delimited option button is selected, and then click the Next button.
5. Make sure the Comma option button is selected, click the Next button, and then click the Finish
button.
6. Click the Close button to close the Get External Data
Text Box dialog box without saving the
import steps.
7. Repeat Steps 1 through 6 to import the Customer text file into the Customer table.
CREATING A QUERY IN A WEB DATABASE
In the Web database shown in Figure E-1, clicking the Customer-Rep Query tab displays the results of a
query that relates the Rep and Customer tables in a datasheet form. The following steps create this query.
1. Close the Navigation Pane (if necessary), and then click the Query button (Create tab | Queries
group) to create a new query and open the Show Table dialog box.
2. Click the Customer table, click the Add button, click the Rep table, click the Add button, and
then click the Close button to close the Show Table dialog box.
3. In the Customer field list, double-click the CustomerNum, CustomerName, and RepNum fields
to add these fields to the design grid.
4. In the Rep field list, double-click the FirstName and LastName fields to add these fields to the
design grid.
5. On the Quick Access Toolbar, click the Save button, type Customer-Rep Query in the Query
Name box, and then click the OK button.
6. Close the query.
CREATING FORMS IN A WEB DATABASE
You need to create several types of forms for this database. The Customer Details and Rep Details forms are
single-item forms. The Customer, Rep, and Customer-Rep Query forms are datasheet forms. Finally, the Main
Menu form is a navigation form. To create the forms in the database, you will use the options in the Forms
Search WWH ::




Custom Search