AllowDeletions Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
You can use the AllowDeletions property to specify whether a user can delete a record when using a form.
Setting
The AllowDeletions property uses the following settings.
Setting | Visual Basic | Description |
---|---|---|
Yes | True (1) | (Default) The user can delete records. |
No | False (0) | The user can't delete records. |
You can set the AllowDeletions property by using the form's property sheet, a macro, or .
Remarks
You can set this property to No to allow users to view and edit existing records but not to delete them. When AllowDeletions is set to Yes, records may be deleted so long as existing referential integrity rules aren't broken.
If you want to prevent changes to existing records (make a form read-only), set the AllowAdditions, AllowDeletions, and AllowEdits properties to No. You can also make records read-only by setting the RecordsetType property to Snapshot.
When the AllowDeletions property is set to No, the Delete Record command on the Edit menu isn't available.
Note When the Data Mode argument of the OpenForm action is set, Microsoft Access will override a number of form property settings. If the Data Mode argument of the OpenForm action is set to Edit, Microsoft Access will open the form with the following property settings:
AllowEdits Yes
AllowDeletions Yes
AllowAdditions Yes
DataEntry No
To prevent the OpenForm action from overriding any of these existing property settings, omit the Data Mode argument setting so that Microsoft Access will use the property settings defined by the form.