Form.
Note The AllowEditing and DefaultEditing properties are included in this version of Microsoft Access only for compatibility with previous versions. It is recommended that you use the AllowEdits, AllowAdditions, and DataEntry properties instead.
The AllowEditing property uses the following settings.
Setting | Description |
Available | (Default) The Allow Editing command on the Records menu is enabled. |
Unavailable | The Allow Editing command is disabled. |
The DefaultEditing property uses the following settings.
Setting | Description |
Allow Edits | (Default) You can edit, add, or delete records in the forms table or query. |
Read Only | You cant edit, add, or delete records until you choose the Allow Editing command. |
Data Entry | You can add new records. Existing records arent available. |
Cant Add Records | You can edit or delete existing records. You cant add new records. |
You can set these properties in the forms property sheet, a macro, or Visual Basic.
Use these properties to design forms for data entry or for read-only access. You can combine them to establish the following conditions.
DefaultEditing | AllowEditing | Description |
Allow Edits | Available or Unavailable | All records are available. You can edit, add, or delete records. |
Read Only | Available | All records are available. You must choose the Allow Editing command to edit, add, or delete records. |
Unavailable | All records are available. You cant edit, add, or delete records. | |
Data Entry | Available | No existing records are available. You can add new records. |
Unavailable | No existing records are available. You cant edit, add, or delete records. | |
Cant Add Records | Available or Unavailable | All existing records are available, and you can edit or delete them. You cant add new records. |
Note The Data Entry setting doesnt completely prevent you from viewing records when using the form. If the AllowFilters property is set to Yes, you can click Remove Filter/Sort on the Records menu to display all records.
AllowAdditions Property, AllowEdits Property, DataEntry Property.
The following example disables the Records menus Allow Editing command and specifies that the form open in data entry mode.
Sub Form_Open(Cancel As Integer) Const conDataEntry = 3 Me.AllowEditing = False ' Disable Records menu option. Me.DefaultEditing = conDataEntrySub