Multiple Linked Databases to a form - Trying to create a new record

legpi197

New member
Local time
Today, 15:32
Joined
Jul 26, 2023
Messages
5
Hello,

I created 10 Access Databases with about 150 records which I have linked via a primary key field to my...lets call it Master Database. I created a form and used these linked I am now trying to create a new record in my Master Database which I was hoping would allow me to enter data into my field values and update my respective databases. I am getting an error when I try to save the newly added record with "Index or Primary Key contain a null value". Not sure why I am getting this error.

Thought linking all the databased and linking them to a primary key would allow for adding new records.
 
Hi. Welcome to AWF!

Are you able to post a sample db with test data, so we can help you troubleshoot the problem?

Edit: Let me rephase that. Are you willing to share a sample copy of your db with test data?
 
I just realized that my linked database tables do not have a New Value option. See pics

Yes i can share my file, but I am new to this form would I just attach it?
 

Attachments

  • Sample Database Table with missing New Value option.png
    Sample Database Table with missing New Value option.png
    37.3 KB · Views: 101
  • Sample Table - with New Value option.png
    Sample Table - with New Value option.png
    27.7 KB · Views: 100
I just realized that my linked database tables do not have a New Value option. See pics

Yes i can share my file, but I am new to this form would I just attach it?
So, by changing the id field to an Autonumber, did that fix your problem. Normally, you could attach a zip file to your post, but new members need to have at least 10 posts first.
 
Hello,

I created 10 Access Databases with about 150 records which I have linked via a primary key field to my...lets call it Master Database. I created a form and used these linked I am now trying to create a new record in my Master Database which I was hoping would allow me to enter data into my field values and update my respective databases. I am getting an error when I try to save the newly added record with "Index or Primary Key contain a null value". Not sure why I am getting this error.

Thought linking all the databased and linking them to a primary key would allow for adding new records.
I'm worried that we might be cross-wise with terminology.

Do you really have 10 different Access accdb files, each with their own tables in them?

Or do you actually have 10 tables in a single Access accdb file?

Sometimes newcomers do mistake "database" for "table". Is that the case here?
 
Hi. Welcome to AWF!

Are you able to post a sample db with test data, so we can help you troubleshoot the problem?

Edit: Let me rephase that. Are you willing to share a sample copy of your db with test data?
I think this is why I am not able to create a new record. It doesn't have an increment
I'm worried that we might be cross-wise with terminology.

Do you really have 10 different Access accdb files, each with their own tables in them?

Or do you actually have 10 tables in a single Access accdb file?

Sometimes newcomers do mistake "database" for "table". Is that the case here?
I have databases with their own table.
 
I think this is why I am not able to create a new record. It doesn't have an increment
Okay, you're halfway through your required post count. You can wait and post your db when you can, or you can email them to me, and I'll post them here for you.
 
The new value property only applies to autonumber fields as in your second screenshot.
This tells Access how to add the next number automatically when a new record is added.
Usually its increment (add 1 to last value used) but Random is also available as a rarely used option

Not relevant to number fields where you enter the data yourself
 
I think this is why I am not able to create a new record. It doesn't have an increment

I have databases with their own table.
That is a very unusual design approach.

However, it does help explain at least part of the puzzle.

You can not enforce referential integrity between tables in different accdbs.

That means there is no viable way to "link" records in any of those 10 accdbs to a table in any other accdb. This is, therefore, going to take quite a bit more context to understand what is going on and how to implement some sort of workable solution.
 

Users who are viewing this thread

Back
Top Bottom