G
Guest
How can I prevent duplicates from being appended (on the fly via an append
query)
to a table when the type of duplicates I want to prevent are entire record
duplicates not just one-field-duplicates. (IOW: it's ok for all field 1
values to
include duplicates and it's ok for all field 2 values to include duplicates
but I
don't want the append query to be able to append records where field 1 and
field 2
are the same as field 1 and field 2 of another record.)....and
....when there is this type of duplicate I want the append action to fail
silently...so the user doesn't get an error. It just doesn't happen.
BACKGROUND INFO
I have an append query,activated by a button on a form (button runs macro
that
opens the append query) which appends records to a table. (There are three
fields:
name number, and color. Ultimately I need a list of numers and colors for
each
name..without duplicates. So I append all these fields for each record from
the
original table that underlies the form to a table (table B)with the append
query
...then a query whose properties are set to Unique Values = yes finds all the
numbers and colors for each name. This is the list without duplicates that I
need.)
If the user hits the button more than once (without changing data) there
will be
duplicate records appended to table B. It could get pretty long if people
get very
happy with that button. I want to avoid having a very big table B in my
database.
Thanks much
query)
to a table when the type of duplicates I want to prevent are entire record
duplicates not just one-field-duplicates. (IOW: it's ok for all field 1
values to
include duplicates and it's ok for all field 2 values to include duplicates
but I
don't want the append query to be able to append records where field 1 and
field 2
are the same as field 1 and field 2 of another record.)....and
....when there is this type of duplicate I want the append action to fail
silently...so the user doesn't get an error. It just doesn't happen.
BACKGROUND INFO
I have an append query,activated by a button on a form (button runs macro
that
opens the append query) which appends records to a table. (There are three
fields:
name number, and color. Ultimately I need a list of numers and colors for
each
name..without duplicates. So I append all these fields for each record from
the
original table that underlies the form to a table (table B)with the append
query
...then a query whose properties are set to Unique Values = yes finds all the
numbers and colors for each name. This is the list without duplicates that I
need.)
If the user hits the button more than once (without changing data) there
will be
duplicate records appended to table B. It could get pretty long if people
get very
happy with that button. I want to avoid having a very big table B in my
database.
Thanks much