Share via

Subform is causing duplicate Main Forms?

Anonymous
2017-10-18T18:09:23+00:00

I'm relatively new to Microsoft Access and built my own database to manage real estate properties - so I must have made a dumb mistake somewhere.

I have two tables (Project Details and Contact Info) that are linked to a form. The relationship is one (Project Details) to many (Contact Info). The form I created has fields from the Project Details table, and I nested a subform to show the Contact Info fields correlated to each unique ProjectID from the Project Details table.

The table views look totally normal and have no duplicates. But when I open the form, there are several exact duplicates for each unique ProjectID. I've finally figured out that the amount of duplicates correlates to how many fields are in the Contact Info subform. For instance, Property 1 only has one row in the Project Details table and 4 rows in the Contact Info table - when I open the form, there are 4 exact duplicate records for Property 1.

Any ideas??? I'm happy to post a simplified copy of my database so you can dig into the details, but I'm not sure where/how to do that.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2017-10-18T21:22:42+00:00

It would appear that you have mistakenly based your form on a Query joining the two tables. In a form - subform arrangement the Form should be based on the "one" side table (here, [Project Details]) and the subform on the "many" ([Contacts]). 

If you base the mainform on a Query it will show all the rows in that query; and if the query joins Property 1 to its four Contacts, you'll see all four.

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-10-18T21:43:34+00:00

    Oh wait, I just figured it out! I think you were right John W. Vinson, something was funky with the source. Thanks!!

    If anyone else has this problem in the future, this is how I fixed it:

    Open the form in Layout View

    Right click anywhere on the form's white space and select "Form Properties"

    Look at the Record Source in the property sheet fields

    Make sure it only lists the table you want to link the data to

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2017-10-18T21:26:35+00:00

    Hmm...I'm pretty sure I didn't base the form on a query - but how would I verify that?

    In the form's design view, when I click on the subform, the Source Object is "Table.Contact Info" with the Link Master/Child Fields as "ProjectID". I'm not positive how to verify the main form's source.

    Was this answer helpful?

    0 comments No comments