AllowEdits Property

Applies To

Form.

Description

You can use the AllowEdits property to specify whether a user can edit saved records when using a form.

Setting

The AllowEdits property uses the following settings.

Setting

Description

Visual Basic

Yes

(Default) The user can edit saved records.

True (–1)

No

The user can't edit saved records.

False (0)


You can set the AllowEdits property by using the form's property sheet, a macro, or Visual Basic.

Remarks

You can use the AllowEdits property to prevent changes to all data displayed by a form. If you want to prevent changes to data in a specific control, use the Enabled or Locked property.

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 AllowEdits property is set to No, the Delete Record command on the Edit menu and the Data Entry command on the Records menu aren'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.

See Also

AllowAdditions property, AllowDeletions property, DataEntry property, Enabled, Locked properties, OpenForm action, OpenForm method, RecordsetType property.

Example

See the AllowAdditions property examples.