MS-Access / Getting Started

Importing from Another Access Database

You can import objects (for example, tables, queries, reports) from one Access database into another. When you import an object, you are making a copy of the object. Any changes you make to the imported object do not affect the original object.

Import an Access Table

To see how to import an Access table object, follow these steps:

  1. Open the database into which you want to import the table.
  2. While viewing the list of tables, right-click anywhere within the Navigation Pane and select Import. (Alternatively, you can select Access from the Import & Link group on the External Data tab of the Ribbon.)
  3. Select Access Database from the flyout menu. The Get External Data - Access Database dialog box appears.
  4. Select the folder where the Microsoft Access database you want to import is located.
  5. Double-click the database file that contains the object you want to import.
  6. Specify how and where you want to store the data in the current database (whether you want to import or link to the table).
  7. Click OK. The Import Objects dialog appears.
  8. Select the Table tab.
  9. Select the table from the list of tables.
  10. Click the Options button. The Import Objects dialog appears.
  11. Select the desired options. Options include whether you want to import relationships, menus and toolbars, and import and export specifications. You can also designate whether you want to import just the table definitions, or the table definitions and the data. Finally, you can opt to import the queries as either queries, or as tables (the result of executing the queries). Generally, you will leave all these options at their default values, although you might want to modify them for specific applications.
  12. Click OK to complete the process.

Importing Spreadsheet Data

You can easily import an Excel spreadsheet into an Access database. To do so, follow these steps:

  1. Open the database into which you want to import the spreadsheet.
  2. With Tables selected as the object type, right-click anywhere in the Navigation Pane and choose Import from the context menu. (Alternatively, you can select Excel from the Import & Link group on the External Data tab of the Ribbon.) The flyout menu appears.
  3. Select Excel from the flyout menu. The Get External Data - Excel Spreadsheet dialog appears.
  4. Use the Browse button to select the Excel file that you want to import.
  5. Specify how and where you want to store the data in the current database (for example, Import the Source Data into a New Table in the Current Database).
  6. Click OK. The Import Spreadsheet Wizard appears.
  7. Select Show Worksheets or Show Named Ranges (Access does not display this step of the wizard if the spreadsheet contains only one worksheet), and then click Next. The Import Spreadsheet Wizard continues.
    If you plan to import spreadsheet data on a regular basis, it is helpful to define a named range in the Excel spreadsheet, containing the data you wish to import. You can then easily opt to import the named range in step 6 each time that you execute the import process.
    Finally, you shouldn't give a control the same name as its control source. Access gives a bound control the same name as its field, and you need to change this name to avoid problems. If you fail to do so, and you reference the field in a formula for the control, #error# will appear on the report in the place of the data for that field. Following these simple warnings will spare you a lot of grief.
  8. Select First Row Contains Column Headings, if appropriate. Notice that the first row appears as column headings rather than data. Click Next. The wizard appears.
  9. Type the field name in the Field Name text box, if necessary.
  10. Select whether you want Access to index the field.
  11. Indicate whether to import a field by selecting the Do Not Import option for that field, if desired.
  12. Click in the field list to select the next field.
  13. Repeat steps 9-12 as appropriate for each field, and then click Next. The wizard appears.
  14. If your data has a column that is appropriate for the primary key, select Choose My Own Primary Key. Otherwise, select Let Access Add a Primary Key.
  15. If you opted to choose your own primary key, select the field from the drop-down box that you want Access to use as the primary key, and then click Next.
  16. Type the table name in the Import to Table text box.
  17. Click Finish.
  18. Click OK.
[Previous] [Contents] [Next]