DOCUMENT:Q110095 06-NOV-1999 [pcmail] TITLE :PC Forms: Err Msg: "Invalid Column Value" Using Grid Control PRODUCT :Microsoft Mail For PC Networks PROD/VER:WINDOWS:1.0,3.0,3.2 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Electronic Forms Designer, version 1.0, used with: - Microsoft Mail for PC Networks, versions 3.0, 3.2 ------------------------------------------------------------------------------- SYMPTOMS ======== When you read a message that was created using a custom form created with version 1.0 of the Microsoft Electronic Forms Designer, you may receive one of the following error messages: Invalid Column Value -or- Invalid Row Value CAUSE ===== This problem can occur if the custom form contains a grid control that is empty or has only one row of data. RESOLUTION ========== When the data in a custom form is unpackaged, the MEF ReadTaggedControls function expects a token at the end of the grid data string. When the grid has 0 or 1 rows, it is not there. To resolve this problem, you can update the code for the WriteTaggedControls and ReadTaggedControls functions by performing the following steps: 1. Open your E-Form project in Visual Basic. 2. In the Project window, select EFORM.BAS. 3. In the Procedures drop-down list box, select WriteTaggedControls. 4. Scroll to the section commented Grid Control. 5. Add the following code below the line: gridClip = Format$(ctrl.Rows) & Chr$(9) & Format$(ctrl.Cols) & Chr$(9) &ctrl.Clip If Right$(gridClip, 1) <> Chr$(13) Then gridClip = gridClip & Chr$(13) End If The line that follows the new code is: MEFWriteText package, Tag, gridClip 6. From the Procedures drop-down list box, select ReadTaggedControls. 7. Scroll to the section commented Grid Control. 8. Add the following code below the line: gridClip = MEFReadText(package, Tag, "") If Right$(gridClip, 1) <> Chr$(13) Then gridClip = gridClip & Chr$(13) End If The lines that follow the new code are: ctrl.Rows = Val(MEFGetToken(gridClip, Chr$(9))) ctrl.Cols = Val(MEFGetToken(gridClip, Chr$(9))) Additional query words: 1.00 ====================================================================== Keywords : Technology : kbZNotKeyword2 kbMailSearch kbZNotKeyword3 Version : WINDOWS:1.0,3.0,3.2 ============================================================================= 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. Copyright Microsoft Corporation 1999.