Can't add new record message

SamMaynard

Board Regular
Joined
Dec 4, 2002
Messages
106
I have a form with fields linked to two tables that are related one-to-one(for confidential information storage). When I enter data on the form and then try to add a new record a message comes up that says, "You cannot add or delete record because a related record is required in another table." Then I press ok and exit out of the form and look at the actual table (not by way of the form) and the record is there! Then I go back to the form and It's not there! Madning!

Have any Ideas? Need more info? Thanks so much. Sam
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Without actually seeing the database, the first thing I would say to check is the Relationships linking the two tables.

I don't know if these situations might cause errors, but:
1. are you linking on fields which are not primary fields?
2. are there other tables in one-to-one relationships that also need to be updated?
This message was edited by jmiskey on 2003-01-28 16:36
 
Upvote 0
The two related tables are student records information. The GeneralInfo table has a primary key called StudentID. The other table is ConfInfo and has the same primary key StudentID.

These two primary key are linked One to one with referential integrity enforced and delete related records marked. I don't have cascade update related field marked because access gives me an error message of Invalid Field definition if I do.

In the datasheet view this works perfectly. The sub datasheets come up and work great also. It's just when I'm using the form. It may also be good to know that on the form I don't have the Primary Key field avalilable because it's an auto number.

Thanks, Sam
 
Upvote 0
I'm not sure.

Are both the Primary Keys that are linked Autonumbers?

Try putting the field on the form. You can hide it if you want by changing the Visible property to "False".
 
Upvote 0

Forum statistics

Threads
1,221,504
Messages
6,160,199
Members
451,630
Latest member
zxhathust

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top