Sunday, March 27, 2011

Tutorial 3: Copying tables in Access

Hi everyone !

      One of the nice features of Microsoft Access is the ability to easily copy existing tables.   This comes in handy when you want to save a copy of a table as a backup,  in order to preserve the table and its data as it appears now.   You may want to export this new table at some point in time, or rename it,  all without affecting the original table.  

Original table containing data
 
New table containing data

  





   



       The copy feature will also let you create a new table with the same structure (fields, indexes, primary keys) as the original table and with none of the data.  This is nice to do when you have a new batch of data to load and you don’t really want to put it in the original table.  I would recommend that you keep a copy of all of your table structures in addition to backing up your data.    


New table with no data
     The last thing the copy will do it is to append the data from the original table into another table.  You don’t get your choice of how much of the data is inserted,  it is an all or nothing operation.   If you only want some of the data from the original table, you can just create a new table with just the structure,  and then cut and paste the rows that you want from the old table to the new table.

      The following  window shows the three choices you get after you highlight the existing table, right-click, and then select ‘Copy’, and then ‘Paste’.   You also highlight the existing table and choose the ‘Copy’ and ‘Paste’ icons.   Access 2010 will insert the name of the table copy as 'Copy of Members',  but you can easily overwrite this and give it a different name, like 'MembersBackup' if you like.

Good luck !

Wayne

Credits:  Digital pictures by Wayne Bornick
              Screenshot from Microsoft Access via Snipping tool


No comments:

Post a Comment