Microsoft KB Archive/208908

= ACC2000: Dirty Property Not Recognized on Unbound Forms =

Article ID: 208908

Article Last Modified on 12/12/2002

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q208908



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.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb. Create a blank, new form. Do not base the form on any table or query. Add a text box to the form. Save the form as Test. View the form in Form view.</li> Open the Utility Functions module.</li> On the View menu, click Immediate Window.</li>  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. </li></ol>

<div class="references_section">