Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Subform in .adp - insert fails

Posted on 2006-04-07
Medium Priority
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
  • 3
LVL 11

Author Comment

ID: 16400807
...it 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

peter57r earned 2000 total points
ID: 16400893
Hi JohnModig,
Have you set the Master and Child links for the subform control?

LVL 11

Author Comment

ID: 16401116
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

ID: 16401293
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
A Case Study of using the Windows API to provide RS232 communications capability in Access without the use of Active-X controls.
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

577 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