PRB: Screen Builder Truncates Format Expression with @R

Last reviewed: February 16, 1996
Article ID: Q114969
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6
  • Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c

SYMPTOMS

If a picture expression is specified using #ITSEXPRESSION ~, and the expression contains an at sign ("@"), the expression will be truncated to the first occurrence of an at sign.

RESOLUTION

See "Workaround" in the "More Information" section below.

MORE INFORMATION

Steps to Reproduce Problem

  1. In the Command window, issue the following commands:

          CREATE TABLE testexp (postalcode c(9))
          INSERT INTO testexp values ( '123456789' )
    

  2. Create a screen and add the following to the Setup snippet:

         #SECTION 1
         #ITSEXPRESSION ~
    
            llUSA = .T.
    
    

  3. Add an input field (GET) for TESTEXP.POSTALCODE.

  4. Choose the Format button and add the following expression:

         ~ IIF(llUSA, "@R 99999-9999", "@R A9A 9A9")
    

  5. Choose OK in the Format and Field dialog boxes.

  6. Open the Field and Format dialog boxes again. The Format expression will be truncated and the "R" check box under Editing Options will be selected. If you run the screen generator, it will place this truncated picture clause in the generated code.

Workaround

Clear the "R" check box in the Format expression dialog box and change the Format expression to the following:

   ~ IIF(llUSA, "99999-9999","A9A 9A9")


Additional reference words: FoxWin 2.50
KBCategory: kbprg kbprb
KBSubcategory: FxprgGeneral


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: February 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.