Importing and Exporting

At some point when using a database you are going to want to read someone else's data into your database or you are going to want to get certain data out of your database.

Importing from another Access Database

Importing objects from another Access database will create a complete copy of a table, query, or any other database object that you select. Import an Access database object by following these steps:

1. Open the destination database.

2. Select File | Get External | Import from the menu bar.


3. Navigate to the Access database from where you want to get the object from. Click the Import button.

4. From the Import Objects window, click on the object tabs to find the object you want to import into the database. Click the Options >> button to view more options. Under Import Tables, select "Definition and Data" if the entire table should be copied or "Definition Only" if the table structure should be copied but not the data. Under Import Queries, select "As Tables" if the queries should appear as regular tables in the destination database. Highlight the object name, and click OK.

The new object will now appear with the existing objects in the database.

Importing from an External Source

You can import from outside sources including other databases, text files, and spreadsheets. When you are importing from an outside source Access provides you with an Import Wizard to make the process easier and assist you with matching your structures with the data being imported. You can create new tables or integrate the data with existing tables. The key is not to waste your time re-entering data that already exists in another format.

1. Open the destination database.

2. Select File | Get External | Import from the menu bar.

3. An import window will open. Choose your file type from the pull down menu near the bottom of the window. Navigate to your file and click import.

4. You will now be presented with an Import Wizard which will present different parameters depending on what data you are importing. This example will import an Excel file. Select your datasheet that you are importing and click next.

5. The next screen will be the column headings selection screen. If the first row of your data contains column heading, select the column headings box. Click the next button.

6. The next screen asks you whether you want to import the data into an existing table or create a new one. In this example we will create a new one. Click next.

7. The next screen allows you to define exactly which fields you want to import. Click on each column and choose whether to import or skip this field, what the field name wil be and whether the field is indexed. When you have finished this click next.

8. The next screen allows you to choose the primary key for this table. For this example we are going to choose the TSN field as the primary key. Click next.

9. The final screen allows us to choose a name for our new table. Type in species and click finish.

10. You now have a new table called species in your database.

Exporting from Access to Access

When you export an object from an Access database you can send it directly to another Access database.

1. Open the Access database containing an object that will be copied (exported) to another Access database.

2. Find the object in the Database Window and highlight it. Then, select File|Export... from the menu bar.

3. Select the destination database from the window and click Save.

4. You will be prompted to name the new object and may also be given other options, such as whether to copy the structure or data and structure of a table. Click OK to complete the export procedure. When done, click ok.

5. Now if we were to open the destination database we found find a new table in it called Species.

Exporting from Access to another format

Exporting is done using the opposite method of importing. Once again Access provides you with wizards that help you to format your outgoing data. There are many different formats that Access allows you to export to including other database management programs, text files, and html files.

1. Open the database containing an object that will be copied (exported) to another database.

2. Find the object in the Database Window and highlight it. Then, select File|Export... from the menu bar.

3. This time we are going to export a database table to a new excel spreadsheet (there are many different data types that you can export to and Access provides you with an export wizard for each one). From the bottom "save as type" pull down menu, choose the data type that you want to export to. Here I am choosing Microsoft Excel. Navigate to where on your computer you want to make this new file and provide a file name in the File Name box at the bottom of the dialog box. Then click save.

4. That's it. Now there will be a new Excel file with your chosen name in the location that you picked. Depending on what format you are exporting to, the wizard may ask you more questions in order to correctly format your outgoing data.