Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8933045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:26:41+00:00 2026-06-15T09:26:41+00:00

The problem When I insert a new record in a multiple item subform, it

  • 0

The problem

When I insert a new record in a multiple item subform, it throws an error as it hasn’t included the required foreign key from the parent form. The foreign key isn’t allowed to be null, and it’s trying to insert a null value.

A bit more information

This process worked fine previously, but I have since upgraded my backend from ACE to SQL Server 2005. It now throws this error:

Run-time error '3146':
ODBC--call failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL into
column 'EngagementLetterID_FK', table 'ClientDatabase.dbo.Services'; column does
not allow nulls. INSERT fails. (#515) [Microsoft][ODBC SQL Server Driver][SQL
Server]The statement has been terminated. (#3621)

As quick comment, the subform is for Service records, and the parent form is for EngagementLetter records. One EL has many Services.

I’ve checked the table set up, and it seems fine, but I would say the table is operating as it should – it shouldn’t allow a null value. Neither do I think SQL Server should be responsible for identifying the correct FK – the frontend should do this. However, my front end was working fine before with the ACE backend. So I’m having trouble finding out what the culprit is, and I can’t figure out how to do more advanced Access debugging (e.g. beforeUpdate, tell me what the SQL INSERT query will be).

I’ve checked some of my other parent-sub forms, and they are behaving fine.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:26:42+00:00Added an answer on June 15, 2026 at 9:26 am

    One other detail that I forgot to mention – I had done some dramatic front end rebuilding at the same time. With the subform, I had not correctly linked EngagementLetterID_FK with EngagementLetterID from the parent form. The result of this is that a new Service record has not had the EngagementLetterID_FK specified.

    So now that I have corrected the link, it’s working fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is as follows. After deleting multiple rows from table, inserting new record
the problem is that it will insert a new record in a mysql table,
I'm new to EF4 and I'm trying to insert a record from a many-to-many
I have problem for bulk insert of the file.I am saving the multiple record
I have a problem when trying to insert a new record into a database.
so the problem is, that i want to insert a new row after another
I have a little problem to insert from 2 different table's in C# to
This problem is baffling me: BEGIN; INSERT INTO sub_users(user_id, email) SELECT user_id FROM users
I get an error when trying to insert into TABLE_EVENTS but no problem inserting/querying
I am trying to insert multiple records into a table where each record has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.