Attachment.Dirty event (Access)
The Dirty event occurs when the content of the specified control changes.
Syntax
expression.Dirty (Cancel)
expression A variable that represents an Attachment object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Cancel | Required | Integer | The setting determines if the Dirty event occurs. Setting the Cancel argument to True (1) cancels the Dirty event. |
Remarks
Examples of this event include entering a character directly in the text box or combo box or changing the control's Text property setting by using a macro or Visual Basic.
Modifying a record within a form by using a macro or Visual Basic doesn't trigger this event. You must type the data directly into the record or set the control's Text property.
This event applies only to bound forms, not an unbound form or report.
To run a macro or event procedure when this event occurs, set the OnDirty property to the name of the macro or to [Event Procedure].
Canceling the Dirty event will cause the changes to the current record to be rolled back. It's equivalent to pressing the Esc key.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for