ACC: Dirty Property Not Recognized on Unbound Forms

Last reviewed: May 7, 1997
Article ID: Q121677
The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0, 97

SYMPTOMS

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

When you reference the Dirty property of an unbound form (a form that is not based on a table or query), you may receive the following error message.

   In Microsoft Access 7.0 and 97:

      Run-time error '2455':
      You entered an expression that has an invalid reference to the
      property Dirty

   In Microsoft Access 2.0:

      Invalid reference to field 'Dirty'

CAUSE

The Dirty property is unavailable on unbound forms. The Dirty property was intended to indicate if the current record in the forms recordset is in edit mode. Because an unbound form has no recordset (the RecordSource property is blank) the Dirty property is not available.

RESOLUTION

Set the form's RecordSource property to a table, query, or SQL statement.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or NWIND.MDB in Microsoft Access 2.0).

  2. Create a blank, new form. Do not base the form on any table or query.

  3. Add a text box to the form.

  4. Save the form as Test.

  5. View the form in Form view.

  6. Open the Utility Functions module.

  7. On the View menu, click Debug Window (or Immediate Window in Microsoft Access 2.0.)

  8. In the Debug window, type the following line, and then press ENTER:

          ? forms!test.Dirty
    

    Note that you receive the error message mentioned earlier in this article.

REFERENCES

For more information about the Dirty property, search the Help Index for "Dirty," or ask the Microsoft Access 97 Office Assistant.


Keywords : FmsProp kberrmsg kbusage
Version : 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


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