Results 1 to 3 of 3
  1. #1
    fret hack is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    13

    AllowEdits and Subforms

    Hello All,

    To sum up the problem, I have added an edit/lock control to a main form to disallow accidental editing of existing fields. There are two subforms (one for Notes and one for Associated Permits) to enter data into related tables that are tied to the main table by “Permit Number”.

    The edit/lock control works just fine; however when AllowEdits = False, only the headers for the subforms are visible unless there are entries for a particular Permit Number.



    If entries exist in the related tables, the subforms show all data and I can add new records

    If there are no entries in the related tables, the subforms only show headers and I cannot add new records, even when in edit mode.

    When AllowEdits = True, the subforms and the edit/lock control all work well, but the form is of course editable until the edit/lock button has been engaged once.

    Hope this makes sense.

    Is it possible for AllowEdits = False and still have the subforms work properly? If not, is there a workaround?

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    The usual workaround is to Lock or Lock/Disable all the Controls in the Main Form, except for the Subform Controls, instead of setting AllowEdits to False, to prevent their being accidentally changed...then reverse this when editing is allowed.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    fret hack is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2017
    Posts
    13
    Thank you very much! I figured that would be the case but wanted to make sure that there wasnt a more efficient way.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. .allowEdits property
    By Lukael in forum Access
    Replies: 3
    Last Post: 11-23-2015, 12:49 AM
  2. Allowedits according to the record
    By lios1984 in forum Forms
    Replies: 4
    Last Post: 06-20-2012, 11:41 PM
  3. Replies: 2
    Last Post: 11-27-2011, 07:08 PM
  4. AllowEdits in Subform
    By Jackie in forum Forms
    Replies: 3
    Last Post: 03-02-2011, 10:51 AM
  5. Form combo box not working with AllowEdits = False
    By jgelpi16 in forum Programming
    Replies: 3
    Last Post: 02-04-2011, 05:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums