Copying and Pasting Tables

To copy a complete table or records of a table to the Windows Clipboard, use the same methods that apply to most other Windows applications. (Using the Clipboard to paste individual records or sets of records into a table is one of the subjects of the next chapter.) You can copy tables into other databases, such as a general-purpose backup database, by using the Clipboard.

To copy a table to another Access database, a destination database must exist. To create a backup database and copy the contents of the HRActions table to the database, follow these steps:

  1. graphics/window_database.gif Activate the Database window.

  2. graphics/data_organization.gif Click the Tables tab, if necessary, to display the list of tables.

  3. Select the table that you want to copy to the new database.

  4. graphics/copy.gif Click the Copy button on the toolbar, press Ctrl+C, or choose Edit, Copy.

    If you plan to copy the table to your current database, skip to step 7.

  5. If you've created a destination backup database, choose File, Open Database to open the database; then skip to step 7.

  6. graphics/new_file_page.gif To create a backup database, choose Tools, Database Utilities, Back Up Database to open the Save Backup As dialog. Accept the default filename, or name the new database Backup.mdb or another appropriate filename.

  7. graphics/paste.gif Click the Paste button on the toolbar, press Ctrl+V, or choose Edit, Paste to open the Paste Table As dialog (see Figure 5.43).

    Figure 5.43. The Paste Table As dialog lets you paste a backup copy of a table into the current or another database.

    graphics/05fig43.gif

  8. You have three options for pasting the backup table to the destination database. The most common choice is Structure and Data, with which you can create a new table or replace the data in a table with the name you enter in the Table Name text box. You can also paste only the structure and then append data to the table later by selecting Structure Only, or append the records to an existing table of the name that you enter. For this example, accept the default: Structure and Data.

  9. Your current or backup database now has a copy of the table that you selected, and the name you entered appears in the Database window. You can save multiple copies of the same table under different names if you're making a series of changes to the table that might affect the integrity of the data that it contains.

To delete a table from a database, select the table name in the Database window and then press Delete. A confirmation message appears. Click Yes to delete the table forever. You can't choose Edit, Undo after deleting a table.



Special Edition Using Microsoft Office Access 2003
Special Edition Using Microsoft Office Access 2003
ISBN: 0789729520
EAN: 2147483647
Year: 2005
Pages: 417

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