Results 1 to 3 of 3
  1. #1
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117

    Form With subform problem

    I have a form with 3 subforms, each subform linked to different tables. The Parent Id on the main form is TR_ID, and I made the same field on each subform so I can link up the parent and child Id. Now these three subforms are tables on the form, so everytime I put a new record in the table, I get a message saying that is duplicated. The first record in the subform is fine, but just the second record I get the error that its duplicated and can not be put in, I want each record in the table to be the same TR_ID, but that's its not working. All help is appreciated!

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    It's because the table(s) in the subform(s) have a unique index on TR_ID. Did you make TR_ID the PK of the subform tables? If so, take it off and add a new PK for the sub-form tables. An autonumber field would do, and you don't need to show it on the subforms.

  3. #3
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    Thanks worked perfectly!

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

Similar Threads

  1. One to many form/subform problem
    By wolfm in forum Forms
    Replies: 3
    Last Post: 10-10-2014, 01:29 AM
  2. Form / subform problem
    By ksmith in forum Programming
    Replies: 5
    Last Post: 08-30-2011, 07:33 AM
  3. form/subform reference problem
    By dbertanjoli in forum Forms
    Replies: 1
    Last Post: 01-10-2011, 03:31 PM
  4. Form - subform linking problem
    By Justin in forum Access
    Replies: 1
    Last Post: 11-11-2010, 11:21 AM
  5. Replies: 2
    Last Post: 06-14-2010, 03:25 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