Microsoft Knowledge Base |
|
PRB: Cannot Trap Error Number 1884 on Form |
|
|
Last reviewed: May 8, 1997
Article ID: Q168191 |
|
The information in this article applies to:
SYMPTOMSYou cannot trap duplicate key errors such as the following:
Uniqueness of index "name" is violated (Error 1884)when the error is caused by a user's interaction with a Grid on a form.
RESOLUTIONFor a workaround that uses record buffering, place the following code in the Valid method of a TextBox of the Grid:
IF .NOT. TABLEUPDATE()
*Invalid Primary Key Trapped here since Error method of Grid does not.
=AERROR(arrtemp)
=MESSAGEBOX('Error:'+STR(arrtemp(1,1));
+CHR(13)+arrtemp(1,2),0,'Error')
RETURN 0
ENDIF
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
|
|
KBCategory: kbprb
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |