Key violation override

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Crystal (anonymous_at_discussions.microsoft.com)
Date: 02/12/04


Date: Thu, 12 Feb 2004 12:25:37 -0800

I'm updating a table via a form. I have code that checks
to make sure that the value entered in the primary key
field is not present in the table. This is on the
BeforeUpdate procedure. I wanted to catch the error
before the user go to the end of the record, since there
are many fields and entry is time-consuming.

The code works, but after it's executed, I get the
standard "The value in the field or record violates the
validation rule for the record or field."

I don't need this because I already have a custom
message. Is there a way to supress this message?

Crystal



Relevant Pages

  • RE: re-useable validation rule
    ... I have a validation rule that can be applied to the same field on various ... Private Sub Form_Open ... Problem is the Like list may need updating, ... would prefer to have this in one place for admin and then refer to it on the ...
    (microsoft.public.access.formscoding)
  • Re: Q: Datatables, Datasets and updating
    ... the automatic updating features of a DataSet and DataAdapter. ... > transfer the data inputted into the SQL database. ... >> The problem seems to be that you have defined Primary Key to mean Identity ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Table with only 1 Row?
    ... >edit the values in the table. ... Set some field as the Primary Key, and put ... a validation rule that it must be equal to its current value. ... Come for live chats every Tuesday and Thursday ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Table with only 1 Row?
    ... the table has a control at the bottom that allows the user to click forward ... This is a built-in Access control and is not a control ... validation rule on the primary key. ... > a validation rule that it must be equal to its current value. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Trigger for updated rows when PK changed
    ... I guess in pure relational theory updating a pk is meaningless - it's always ... Presumably a row-level trigger in something like Oracle would reflect this ... John ... > other than the primary key to uniquely the rows of your table, ...
    (microsoft.public.sqlserver.programming)