Form.AllowAdditions Property
Access Developer Reference |
You can use the AllowAdditions property to specify whether a user can add a record when using a form. Read/write Boolean.
Syntax
expression.AllowAdditions
expression A variable that represents a Form object.
Remarks
Set the AllowAdditions property to No to allow users to view or edit existing records but not add new records.
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.
If you want to open a form for data entry only, set the form's DataEntry property to Yes.
When the AllowAdditions property is set to No, the Data Entry command on the Records menu isn't available.
Note |
---|
When the Data Mode argument of the OpenForm action is used, 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
Example
The following example examines the ControlType property for all controls on a form. For each label and text box control, the procedure toggles the SpecialEffect property for those controls. When the label controls' SpecialEffect property is set to Shadowed and the text box controls' SpecialEffect property is set to Normal and the AllowAdditions, AllowDeletions, and AllowEdits properties are all set to True, the intCanEdit
variable is toggled to allow editing of the underlying data.
Visual Basic for Applications |
---|
|
See Also