Microsoft KB Archive/90802

From BetaArchive Wiki

PRB: "Invalid Use of Null Alert" Error with Eval() Function

Article ID: Q90802
Creation Date: 22-OCT-1992
Revision Date: 19-SEP-1996 The information in this article applies to:

  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0

SYMPTOMS


Moderate: Requires basic macro, coding, and interoperability skills.

If you use the Eval() function on a field that does not contain a value, you may receive the following error message:

   Invalid Use of Null Alert

STATUS

This behavior is by design.

MORE INFORMATION


Steps to Reproduce Behavior


In Microsoft Access for Windows 95 version 7.0:

  1. Create a form (Form1) with a text box (text0).
  2. View the form in Form view.
  3. Press CTRL+G to bring up the Debug Window.
  4. Type the following line in the Debug Window:

          = Eval("Forms!Form1!Text0").

    Note that you receive the error message "Invalid Use of Null Alert."

In Microsoft Access versions 1.x and 2.0:

  1. Create a form (Form1) with a text box (text0).
  2. View the form in Form view.
  3. Open a module.
  4. Type the following line in the Immediate window:

          stForm$ = Eval("Forms!Form1!Text0")

    Note that you receive the error message "Invalid Use of Null Alert."



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.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.


Additional reference words: 1.00 1.10 2.00 7.00
KBCategory: kbprg kberrmsg
KBSubcategory: PgmOthr