Subform Restrictions

In Access I had designed a form (projects) with a subform (people).  The subform would allow you to add existing people or enter a new person. When I converted the application to SQL Server backend, I could no longer add new people on the subform only add existing people.

Main Form
Project ID
Project Name

People Subform
People ID
People Name

Because projects can have many people and people can be on many projects there is a junction table

ProjectID
PeopleId
PersonInvolvement

Why would SQL Serve database now not allow me to add new people on a subform when Access would?
gcgcitAsked:
Who is Participating?
 
LambertHeenanConnect With a Mentor Commented:
I'm guessing that in your junction table "ProjectID" is the foreign key into the projects table, and likewise "PeopleID" is the FK to your people table.

So both those fields in the junction table need to allow duplicate values as people can be involved with many projects.

So the problem you have is that the junction table does not have a unique index, and for a table to be updateable in SQL server there must be such a unique index. So the problem should be solved by simply adding an INDENTITY field to the junction table (I think that's the right term, not using SQL server myself.)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.