Form.Dirty Property
Access Developer Reference |
You can use the Dirty property to determine whether the current record has been modified since it was last saved. Read/write Boolean.
Syntax
expression.Dirty
expression A variable that represents a Form object.
Remarks
For example, you may want to ask the user whether changes to a record were intended and, if not, allow the user to move to the next record without saving the changes.
When a record is saved, Microsoft Access sets the Dirty property to False. When a user makes changes to a record, the property is set to True.
Example
The following example enables the btnUndo
button when data is changed. The UndoEdits( ) subroutine is called from the AfterUpdate event of text box controls. Clicking the enabled btnUndo
button restores the original value of the control by using the OldValue property.
Visual Basic for Applications |
---|
|