ACC2000: Dirty Property Not Recognized on Unbound Forms

ID: Q208908


The information in this article applies to:
  • Microsoft Access 2000

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


SYMPTOMS

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:

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


CAUSE

The Dirty property is unavailable on unbound forms. The Dirty property was intended to indicate if the current record in the form's 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 RecordSource property of the form to a table, query, or SQL statement.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.


  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 Immediate Window.


  8. In the Immediate window, type the following line, and then press ENTER:
    
    ? forms!test.Dirty 
    Note that you receive the error message mentioned in the "Symptoms" section.



REFERENCES

For more information about the Dirty property, click Microsoft Access Help on the Help menu, type "dirty property" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Additional query words: prb

Keywords : kberrmsg FmsProp
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: May 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.