Results 1 to 6 of 6
  1. #1
    Calego is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    10

    SubForm not allowing new records

    OK. I have a one-to-many relationship form where the parent table is Parts and the child table is Items. For each Part-ID in the parts table the associated items show in the subform. The subform is in Datasheet view. The Parts table is in form view. I had the Items subform set as Allow Additions = "Yes" and Allow Deletions, Edits are set to "No." It was working just fine and then I started messing around with the options. Somehow I got it set so that the Items subform no longer allow new records. I have Allow Additions set to "Yes" on the subform, yet it continues to not allow new records. I don't know how it happened or why. I don't know where else to look in the myriad of options.



    To try and resolve it, I copied the entire form to a new one. I then deleted the Items subform and created it again, set it up the same way it was before. It STILL will not allow new records, even with the Allow Additions set to "Yes." I am totally confounded. Someone please point me in the right direction here. Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is the Record Source of the SubForm UPDATEABLE?

  3. #3
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,803
    I believe Data Entry has to be set to no on the subform for this situation. What are your settings for all the "Allow" properties of the subform? Check your link master and link child settings on the subform. Check your subform control properties too - that the source, links and enabled/locked properties haven't been incorrectly set. If all is well with that, ensure your subform query is updatable.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Calego View Post

    ...It was working just fine and then I started messing around with the options...
    Did some of this 'messing around' include changes to the Main Form? The 'Subform' is actually a Subform Control of the Main Form, and if that Control is Locked, or if the AllowEdits Property of the Main Form is set to No/False, you cannot do anything to the data in the Subform, regardless of how the Properties of the Form the Subform is based on are set.

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

    All posts/responses based on Access 2003/2007

  5. #5
    Calego is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    10
    Quote Originally Posted by Missinglinq View Post
    Did some of this 'messing around' include changes to the Main Form? The 'Subform' is actually a Subform Control of the Main Form, and if that Control is Locked, or if the AllowEdits Property of the Main Form is set to No/False, you cannot do anything to the data in the Subform, regardless of how the Properties of the Form the Subform is based on are set.

    Linq ;0)>
    YES! That is what is was! I did not realize that the main form would affect the subform like that. It appears that Allow Edits on the main form has to be set to "Yes" in order to allow new records to be added to the subform. The other settings don't seem to affect the subform. I then needed to go to the individual fields on the main form and set them to Locked = "Yes." Thank you!

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by Calego View Post

    ...I then needed to go to the individual fields on the main form and set them to Locked = "Yes"...
    That's the standard workaround, for this. The Access Gnomes consider doing something to Control to be 'editing' it...and adding Records to a Subform is 'doing something!'

    BTW, the same thing applies to Comboboxes! If a Form's AllowEdits Property is set to No...selections cannot be made form Comboboxes! Once again, making a selection from a Combobox Control is considered to be 'editing' the Control. The workaround would be the same one you just used.

    Good luck with your project and welcome to AFN!

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

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 10
    Last Post: 08-16-2013, 02:15 AM
  2. Replies: 16
    Last Post: 04-25-2013, 12:38 PM
  3. Subform not always allowing new record creation
    By Canadiangal in forum Forms
    Replies: 1
    Last Post: 03-28-2013, 11:00 PM
  4. Replies: 2
    Last Post: 02-12-2013, 11:23 AM
  5. Replies: 12
    Last Post: 08-30-2011, 03:36 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