Microsoft KB Archive/90725

{|
 * width="100%"|

PRB: Giving Controls Duplicate Name Does not Generate Error
'Article ID: Q90725

Creation Date: 21-OCT-1992

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

SYMPTOMS

If you give a control the same name as another control, and you press TAB or ENTER, you may receive the following error message:

You already have a Control name However, if you click outside the property sheet instead of pressing TAB or ENTER, the error message does not appear and the control returns to its original name. Also, when you give a control a duplicate name in a form and then close the form, you will not receive an error message. The control name will return to its original name.

CAUSE

Because Microsoft Access cannot prevent you from clicking outside the property sheet, it was decided that clicking outside the property sheet would silently commit any changes and if the changes violated integrity, the changes would be canceled. If Microsoft Access had not been designed in this manner, the error message would appear when you were in the wrong window, which might be confusing.

STATUS

This behavior no longer occurs in Microsoft Access version 2.0.

MORE INFORMATION

Steps to Reproduce Behavior


 * 1) Add two text boxes to a form.
 * 2) Set the control name of one text box to Field0.
 * 3) Set the control name of the second text box to Field0, but instead of pressing ENTER, click outside the property sheet. Note that the error message does not occur, and the control reverts to its original name as if you had canceled the event.
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10 alert

KBCategory: kbusage kberrmsg

KBSubcategory: FmsProp