• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Working with Access Databases... > Copying and Pasting Tables

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 use Clipboard operations extensively when you reach Part V of this book, "Integrating Access with Other Office 97 Applications." You can copy tables into other databases, such as a general-purpose backup database, by using the Clipboard; however, exporting a table to a temporary database file, described in Chapter 7, "Linking, Importing, and Exporting Tables," is a more expeditious method.

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

Make the Database window active by clicking it, if it is accessible, or by choosing Window, 1 Database.

Click the Tables Tab, if necessary, to display the list of tables.

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

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.

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

To create a backup database, choose File, New Database; then choose a blank database and name it backup.mdb or another appropriate file name. Access creates your Backup.mdb database, which occupies approximately 60K without any tables (this is called 60K of overhead). Your new database is now active.

Click the Paste button on the toolbar, press Ctrl+V, or choose Edit, Paste. The Paste Table As dialog shown in Figure 4.42 appears.

Figure 4.42. The Paste Table As dialog.

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 of the name that you enter in the Table Name text box. You also can 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.

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



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint