Subform Restrictions

Posted on 2011-05-06
Last Modified: 2012-05-11
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


Why would SQL Serve database now not allow me to add new people on a subform when Access would?
Question by:gcgcit
    1 Comment
    LVL 11

    Accepted Solution

    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.)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now