Lesson11.2.Exporting Information


Lesson 11.2. Exporting Information

Figure 11-5. Step 1 of the Export Text Wizard


Figure 11-6. 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.


Figure 11-7. 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.

  1. 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.

  2. 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.

  3. If necessary, browse to your Practice folder. Type Customers in the File Name box. Click the Save as type list arrow and select Text Files. Click the Export button when you're finished.


    Tip: Another way to export a table is to select the table and select File

    The Export Text Wizard appears, as shown in Figure 11-5. 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.

  4. Click Next.

    The second step of the Export Text Wizard appears, as shown in Figure 11-6. 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 rowotherwise you may have to add the field names to the data by yourself later.

  5. 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.

  6. Click the Windows Start button and select All Programs Windows starts the Notepad program.

  7. Select File The Open dialog box for the Notepad program appears.

  8. Browse to your Practice folder and double-click the tblCustomers text file.

    The comma-delimited text file appears, as shown in Figure 11-7. 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.

  9. Close the Notepad program.

QUICK REFERENCE

TO EXPORT A TABLE TO AN EXTERNAL FILE:

  1. IN THE DATABASE WINDOW, RIGHT-CLICK THE TABLE AND SELECT EXPORT FROM THE SHORTCUT MENU.

    OR...

    SELECT THE TABLE AND SELECT FILE

    SELECT A FORMAT FROM THE SAVE AS TYPE LIST AND THEN, IF NECESSARY, TYPE A NEW FILE NAME IN THE FILE NAME TEXT BOX.

  2. CLICK EXPORT.

  3. FOLLOW THE ONSCREEN INSTRUCTIONS OF THE EXPORT TEXT WIZARD TO EXPORT THE DATA.




CustomGuide Inc - Access 2003 Personal Trainer
Access 2003 Personal Trainer (Personal Trainer (OReilly))
ISBN: 0596009372
EAN: 2147483647
Year: 2005
Pages: 209

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net