FIX: Can't Change the Title of the Validation Error Box

Last reviewed: October 29, 1997
Article ID: Q137951
3.00 WINDOWS kbprg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

The title on the Validation Error text box cannot be changed.

CAUSE

The dialog box title is being pulled from an internal resource of Visual FoxPro, so it cannot be changed.

WORKAROUND

Trap for the rule failure within the rule's code, and present a customized error message. Let the rule return True (.T.) as in code in the "Workaround Example" section in this article.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0b for Windows.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Execute the following commands in the Command window:

    CREATE DATABASE Test1

    CREATE TABLE tbl1 (one c(3) CHECK !EMPTY(one) ;

          ERROR 'error message here')
    

  2. Browse the new table, and press CTRL+Y to append a blank record.

  3. The validation box will appear with "Microsoft Visual FoxPro" as the title.

Workaround Example

Change the rule from an expression to a program or procedure that is in the Stored Procedures:

   ALTER TABLE tbl1 ALTER COLUMN one SET CHECK myrule() NOVALIDATE

   The procedure myrule may look as follows:

   PROCEDURE myrule
   IF EMPTY(one)
      =MESSAGEBOX('The -one- FIELD CAN NOT BE EMPTY',0,'MY APPLICATION')
   ENDIF

After the table is browsed and CTRL+Y is pressed, the customized dialog box will appear with the new title.

NOTE: A blank record will still be appended to the table. This issue of the rule violation is best handled within the application's design.


Additional reference words: 3.00 VFoxWin fixlist3.00b buglist3.00
KBCategory: kbprg kbfixlist kbbuglist
KBSubcategory: FxprgTable
Keywords : FxprgTable kbbuglist kbfixlist kbprg
Version : 3.00
Platform : WINDOWS
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" 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.

Last reviewed: October 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.