Part III: More-Advanced Access Techniques
588
l (^) ODBC: ODBC is a data-access technology that uses a driver between an Access database
and an external database file, such as Microsoft SQL Server or Oracle. Generally speaking,
because the linked data source is a database table, you can perform whatever database
operations (modifying, deleting, adding) you would with a native Access table, provided
the table has a unique index defined. (I discuss ODBC database tables in some detail in
the “Linking to ODBC data sources” section later in this chapter.)
Linking to other Access database tables
Access easily incorporates data located in the other Access files by linking to those tables. This process
makes it easy to share data among Access applications across the network or on the local computer. The
information presented in this section applies to virtually any Access data file you linked to from an
Access database. Later in this chapter, you’ll see short sections explaining the differences between link-
ing to an Access table and linking to each of the other types of data files recognized by Access.
Note
A very common practice among Access developers is splitting an Access database into two pieces. One piece
contains the forms, reports, and other user-interface components of an application, while the second piece
contains the tables, queries, and other data elements. There are many advantages to splitting Access databases,
including certain performance benefits as well as easier maintenance. You can read about splitting Access
databases in Chapter 21. The process of linking to external Access tables described in this section is an essen-
tial part of the split database paradigm.
After you link to another Access table, you use it just as you use any table in the open database
(with the exception that it can’t be used in a relationship to other tables not in the source data-
base). Follow these steps to link to tblSalesPayments in the Chapter16_Link.accdb data-
base from the Chapter16.accdb database file:
- Open the Chapter16.accdb database.
- Select the External Data ribbon, and then choose Access as the type of data you want to
link.
The Get External Data dialog box (shown in Figure 16.4) appears.
- Click the Browse button to open the Windows File Open dialog box. Locate the
Chapter16_Link file, and click Open.
The File Open dialog box closes and you’re taken back to the Get External Data dialog box.
- Click OK in the Get External Data dialog box.
The Link Tables dialog box enables you to select one or more tables from the selected
database (in this case, Chapter16_Link). Figure 16.5 shows the Link Tables dialog
box open on Chapter16_Link.accdb.
- Select tblSalesPayments and click OK.
Double-clicking the table name won’t select the table — you must highlight it and then
click OK.