Subform in .adp - insert fails

Posted on 2006-04-07
Last Modified: 2012-06-27
Hi there.
I have just started to learn SQL Server 2005 and am using it together with an Access .adp as front end. So - in SQL Server I have created two tables: tblProducers and tblProducts. I have also created a relationship between the two, using fields named ProducerId in both tables. In Access I have created a form for tblProducers with a subform for tblProducts. My problem is that I cannot insert new records in the subform. Whenever I create a new record in the subform, the value for ProducerId does not get copied from the main form, resulting in value NULL and therefore insert fails. What am I missing here?

Question by:JohnModig
    LVL 11

    Author Comment

    by:JohnModig works fine whenever I open the table (not the form) in Access. Then the value from ProducerId gets linked and the insert is successful. However, when I try to do it from the subform it fails.
    LVL 77

    Accepted Solution

    Hi JohnModig,
    Have you set the Master and Child links for the subform control?

    LVL 11

    Author Comment

    Hi Pete.
    Yes, I have set the Master and Child links. The two fields have the same name - that could not be the problem, right?
    LVL 11

    Author Comment

    Duh! I just realised, Pete - you were right. I had not set the links. Been up too long I guess. Thanks for your help.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    This article is a continuation or rather an extension from Cascading Combos ( and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    745 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

    19 Experts available now in Live!

    Get 1:1 Help Now