Search code examples
ms-accessvbams-access-2013

How to prevent user from deleting/editing or adding records on subform in MS ACCESS 2013


This is the form

As you can see on the image above, I have a form with subform attached inside it. What I want is to prevent user from directly Adding or Deleting and even Editing records or items inside the subform and only allowed the text fields and buttons to do the Adding Deleting and Editing.

Note: I have no knowledge in VBA.


Solution

  • I guess, when clicking either of these buttons, you could:

    1. set AllowAdditions and -Deletions, respectively, to True
    2. add/delete the record
    3. set AllowAdditions or -Deletions to False

    To open the form for data entry only (not showing existing records), set the form's DataEntry property to: Yes (True).