Importing Information from an Access Database

Importing Information from an Access Database

Suppose you already have an Access database that includes tables of information about products and orders, and another that includes contact information. Now you wish you had just one database so that all the information you use on a regular basis is in one place. You had to create the existing databases by hand and then type in all the data, and you don’t relish the thought of having to retype anything. You can take advantage of this earlier work by importing the product and orders information into the contacts database, rather than re-creating it all.

You can easily import one or more of the standard Access objects: tables, queries, forms, reports, pages, macros, and modules. When importing a table, you have the option of importing just the table definition (the structure that you see in Design view), or both the definition and the data. When importing a query, you can import it as a query or you can import the results of the query as a table.

When you import an Access object, the entire object is imported as an object of the same name in the active database. You don’t have the option of importing selected fields or records. If the active database already has an object of the same name, Access imports the object with a number added to the end of its name.

Tip

If you need only some of the fields or records from a table in another database, you can create a query in the other database to select just the information you need, and then import the results of the query as a table. Alternatively, you can import the table and then either edit it in Design view or use queries to clean it up.

In this exercise, you will import a couple of tables from a Products database into the GardenCo database.

USE the GardenCo and Products databases in the practice file folder for this topic. These practice files are located in the My DocumentsMicrosoft PressAccess 2003 SBSImportingImportAccess folder and can also be accessed by clicking Start/All Programs/Microsoft Press/Access 2003 Step by Step.

OPEN the GardenCo database and acknowledge the safety warning, if necessary.

  1. On the File menu, point to Get External Data, and then click Import.

  2. In the Files of type list, make sure Microsoft Office Access is selected.

  3. Navigate to the My DocumentsMicrosoft PressAccess 2003 SBSImportingImportAccess folder, click Products, and then click Import.

    The Import Objects dialog box appears, in which you can import any type of Access object from this database.

  4. Click the Options button to expand the dialog box and display the import options.

    Tip
  5. Click Select All to select the two tables listed.

  6. Click OK to import the tables.

  7. Open the new Categories and Products tables to confirm that records were imported.

  8. Close the two tables.

CLOSE the GardenCo database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset