Step 1 of the Export Text Wizard
Step 2 of the Export Text Wizard: Specify the text delimiter that separates the fields if you want to include the field names in the exported file.
The exported text file viewed in the Notepad program.
When you export an , you save its information in a different format so that it can be understood and opened by different programs. For example, you might export an Access table to an Excel worksheet.
In this lesson you will learn how to export an Access table to a comma-delimited text file.
Make sure the Database window is displayed and click the Tables icon in the Objects bar, if necessary.
You want to export the tblCustomers table to a comma-delimited text file so that it can be opened by other programs.
Right-click the tblCustomers table and select Export from the shortcut menu.
A dialog box appears, and Access asks where you want to export the table. You need to specify a file name and file format.
If necessary, browse to your Practice folder. Type
Customersin the File Name box. Click the Save as type list arrow and select Text Files. Click the Export button when you're finished.
Another way to export a table is to select the table and select File » Export from the menu.
The Export Text Wizard appears, as shown in figure. Here you need to specify how the information is stored in the text file. There are two options:
Delimited: Tabs, colons, semicolons, or other characters separate items in your text file. This is the most common (and default) option.
Fixed Width: All the items in your text file are aligned in columns.
If you're saving to a text file you will almost always want to select the "Delimited" option.
The second step of the Export Text Wizard appears, as shown in figure. Here you have to specify the character you want to use as the delimiter to separate the fields in the text file (usually a tab or comma). What is vitally important here is the "Include Field Names on First Row" check box. You will usually want to include field names in the first row otherwise you may have to add the field names to the data by yourself later.
Click the Include Field Names on First Row check box to select it, then click Finish. Click OK to close the confirmation message.
Access exports the tblCustomers table to a comma-delimited text file. If you want, move on to the next couple of steps and we'll see how the exported text file looks. Otherwise, feel free to skip them and move on to the next lesson.
Click the Windows Start button and select All Programs » Accessories » Notepad.
Windows starts the Notepad program.
Select File » Open from the menu.
The Open dialog box for the Notepad program appears.
Browse to your Practice folder and double-click the tblCustomers text file.
The comma-delimited text file appears, as shown in figure. It doesn't look pretty, but the information you're looking at is in a format that is very easy for most computer programs to understand.
Close the Notepad program.
TO EXPORT A TABLE TO AN EXTERNAL FILE:
IN THE DATABASE WINDOW, RIGHT-CLICK THE TABLE AND SELECT EXPORT FROM THE SHORTCUT MENU.
SELECT THE TABLE AND SELECT FILE » EXPORT FROM THE MENU.
SELECT A FORMAT FROM THE SAVE AS TYPE LIST AND THEN, IF NECESSARY, TYPE A NEW FILE NAME IN THE FILE NAME TEXT BOX.
FOLLOW THE ONSCREEN INSTRUCTIONS OF THE EXPORT TEXT WIZARD TO EXPORT THE DATA.