From: Terrence Carroll on
I was wondering if it is possible to implement an error handling feature
where the user is alerted he is attempting to import duplcate values to a
primary key field while still haveing the warnings property set to NO. Any
advice on how to do this would be great.

Thanks,

Terry Carroll
From: Wayne-I-M on
Hi

You could use the indexing in the table to disallow the additions.
Or
You could could use a simple popup message

But - - -
The idea of a primary field is that it can't/shouldn't allow duplicates - so
best to use the indexing feature in the table for this (eg. Allow duplicates
= No)


--
Wayne
Manchester, England.



"Terrence Carroll" wrote:

> I was wondering if it is possible to implement an error handling feature
> where the user is alerted he is attempting to import duplcate values to a
> primary key field while still haveing the warnings property set to NO. Any
> advice on how to do this would be great.
>
> Thanks,
>
> Terry Carroll
From: Jeff Boyce on
Terrence

What is it that you are expecting the user to do if there is a duplicate key
situation? Access won't overwrite an existing key, so it seems like the
only reason to handle it is to let the user know there's something wrong.

Do you need to do that? Not a rhetorical question ... if you want to add
records to your table, but not add records that have a duplicate key, you
can do that without ever bothering the user.

More info, please...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Terrence Carroll" <TerrenceCarroll(a)discussions.microsoft.com> wrote in
message news:704EC044-3026-4958-A571-BE968769793D(a)microsoft.com...
>I was wondering if it is possible to implement an error handling feature
> where the user is alerted he is attempting to import duplcate values to a
> primary key field while still haveing the warnings property set to NO.
> Any
> advice on how to do this would be great.
>
> Thanks,
>
> Terry Carroll