If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Primary key warning messages
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 |
#2
|
|||
|
|||
Primary key warning messages
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 |
#3
|
|||
|
|||
Primary key warning messages
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" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|