Importing Records in MS Access
Created on 5 Oct 2001
For enquiry, email Dr
Chan Kai Soon
Overview
This file is created to help you import records into your birding database
which acts as a target database. The importing is done via a temporary
database which should have been created from a source database following
the steps described in Export-Records.html.
The import procedure involve two stages as described in sections A and
B below. The method is similar to the export procedure except that you
do not need to create the temporary database which is already available.
You also do not need to select records using a query because you will probably
want to import all records.
Before you proceed, it is suggested that you
make a backup copy of your databases in another folder in case of any error
or damage. You can then copy them back to your original folder and retry.
A: Open temporary database and and copy records to
the clipboard
-
You should have your temporary database (received via email or diskettes)
copied into the same folder as your target database.
-
Open the temporary database (name defined during the export procedure).
-
Click the table TAB and then Open the appropriate table (table name
defined during the export procedure).
-
Browse through the records to check for any gross errors. Note the number
of records available. Data for the following fields (SpeciesName, BirderName,
TripName and Location) must already be defined in appropriate tables with
the same names. If they are not present, there will be paste errors
and those records involved will not be imported. However, you can choose
to save these unpasted records in a 'Paste Error' table. See Paste Error
Notes below.
-
Click the Edit Menu and then Select All Records.
-
Click the Edit Menu and select COPY. This will copy the selected
records to the clipboard.
-
Close the table and answer Yes to save contents to the clipboard.
Note that if there are too many records to be added to the Clipboard and
you have little memory, it will take a long time for the query to close.
-
Close the temporary database
B: Paste the clipboard contents into the target table
(Sightings table).
-
Open the target database.
-
Click the Table TAB
-
Open the 'Sightings' table.
-
Click the Edit Menu and then select Paste Append. Note that
if there are too many records to be pasted, the append process may take
a long time. If you cannot find Paste Append, repeat section A.
-
If a Paste Error message results, choose to save records in a Paste Error
table.
-
If no Paste Error message occurs, click Yes to confirm records to
be appended. All records from the clipboard will be pasted and the number
of records in the table will increase by the same number copied in section
A.
-
You can check the pasted records by browsing the table in datasheet view.
Alternatively, use any of the suitable Reports to check the imported records.
-
Close the target database.
Paste Error Notes: If any error occurs
in step B, records that are not successfully pasted can be saved in a table
called Paste Error or Paste Error1 etc. Browse through these tables
to see if the records there are compatible with the Sightings table (exact
number of fields and in the exact sequence). Field contents in these Paste
Error tables probably do not match those in your target tables. For example,
there may be a birdername in the paste error table which is not present
in the birder table. If you add this birdername to the birder table,
you can probably import the records using the same copy to clipboard (section
A but using the paste error table instead of the temporary table) and paste
append method (section B).
If you find is hard to find the particular birder name or trip name
or location causing the paste error, request for all records from birders,
trips or location tables to be exported and then imported into the table
with the same names. Any names not present in the target will be imported
while those already present will be saved in a paste error table.
Then you should be able to import the sightings with no problems.
Delete the Paste Error tables if you do not need them anymore. Compact
the database using the Tools Menu.
You may want to rename and archive the temporary database to a different
folder.
Further notes: Transferring data from
the previous version
This is a very tricky situation and I suggest you make a backup
copy before you try it. If you are not familiar with Access, try to get
someone more familiar with the software to help you.
Using the same principle of copying records (from previous verion) to
the clipboard and and pasting them into the current version, you can 'upgrade'
your previous version of database to this version. However, every pasted
record must have a corresponding value in the current version for speciesname,
birdername and tripname. You should first copy and paste the location and
tripname tables to put corresponding values into the current database version.
Since corrections to speciesnames (the previous version had significant
typing errors in speciesnames) had been done, some records will give an
error during pasting and these will be saved in a 'paste error' table.
You can look at the contents of these records one by one and add corresponding
'wrong' speciesname in the current table. Then you should be able to import
from the 'paste error' table. After importing, use the sightings edit form
to change the 'wrong' speciesname to the newer correct name. Then delete
the 'wrong' names. See 'how to correct
data involved in integrity check' for more information.
If the source database also contains other tables such
as Tripname, birders or Location tables, you must first import those tables
into the corresponding tables in you own database before trying to import
the Sightings. Do not worry if you get paste errors for these tables
because it is likely that there will be duplicate records which will be
rejected into the paste error table. Just delete the paste error table
before you import the Sightings records.
Please note that there is no way to prevent duplication of sightings
data by pasting the same source table into the target more than once.
Back to FAQ