A key is like an non-displayed field that is added to your database.
While I don't remember exactly, A "composite key" sounds like a key
composed of more than one field. It is populated by Access and
consists of one or more fields combined into a single extra field
which is not displayed in the database.
In Data Sheet design view, you can hold the Ctrl key and click on
multiple fields and then click on the "Key" icon or select in the top
menu to make them a key.
A key may be implemented by concatenating all the fields composing the
key and then "hashing" them (translating the resultant string into a
number). This number will be unique for all records that have a unique
combination of entries in the fields you have selected to be the "key"
(i.e. composing your "key").
Keys can be used to identify and/or remove duplicate records. When
copying from a full table into a new, empty table with a defined key,
all records with identical key values from the source database will
cause collisions that generate errors which you can trap and handle
with an error handler. In your VBA copy routine or error handler you
can route them into either a "Duplicates" table or a "Unique_Records"
table. If you do and un coded copy in Access (click on upper left
corner of source table to select all records, then hit Ctrl-C, then
minimize source table, then click upper left corner of destination
table, then hit Ctrl-V) then it will give you a message for the first
collision (duplicate record) and let you specify not to interrupt you
for each duplicate.
The reason I wrote my own VBA De-Dupe and Purge routines
(modules/forms) is because Access's default handling of things like
empty records, empty key fields, etc was insufficient to perform the
required filtering.
>and so+ on...
>
>Thanks
See you at the show trials - lol.
---------------------------------------------------
Michael J. Strickland Reston, VA
---------------------------------------------------