1 - Many Relationship -Primary key

sbyrne

New Member
Joined
Jan 8, 2004
Messages
4
Hello all,

I have two tables with a 1-many relationship. Each have an autonumber as a primary key. Is there any way that on the many table, the primary key can be reset for each record on the 1-table?

To explain - an incident will get a reference number eg 895. Each incident will have multiple notifications. Ideally, I would like the notifications to be numbered from 1 up for each incident thereby requiring the notification primary key to be a contactenated key (895-1, 895-2, 896-1) etc.

Any assistance would be greatly appreciated.

Regards,
Sinéad
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Keep the Autonumber as the primary key in the notification table.

Add another field, a foreign key, which corresponds to the primary key of the incident the notification is related to.

You can then get all the notifications for each incident using this field.
 
Upvote 0

Forum statistics

Threads
1,221,805
Messages
6,162,074
Members
451,738
Latest member
gaseremad

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