making records relate

dbh139

New Member
Joined
Jan 26, 2003
Messages
33
I have many primary keys that are auto numbers and I have referential intergrity enabled. I want to know why when I create a new record that my auto number in the primary field does not automatically copy to the foreign key field? Do I need to manually create something that will make these fields identical? I thought by using referential integrity and using relationships between the fields that they would automatically do this. Any ideas what I am doing wrong?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Are you entering records on linked parent/child forms? If so, have a look in the subform's properties and see what, if anything, the link child/link master properties are set to. If there is no setting, then that's your problem (The form design wizard usually links for you, but I seem to remember seeing a case where this wasn't true). If it's not a forms issue, specify how you're going about entering data and we'll see if we can help.
 
Upvote 0
Hi dbh139,

You need to check 'cascade update related fields' when you set referential integrity.

You can check 'cascade delete related fields' if you want to delete related fields, but be VERY careful with this option, as you might inadvertantly clear out an entire table.

I prefer to use a delete query to delete related records, but I do cascade update related fields.

HTH,
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

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