# Miscellaneous > Database Design >  Need to create foreign key in access 2007

## dvorasnell

Plesae help!  I am building a relational database with 2 main tables that should relate in a one to many relationship.  I have gone to the design tab created relationship, done the join but cannot enforce referential integrity.

The database tracks managers and their accounts.  ONe table tracks managers and the subtable (the many) tracks their accounts.  

Of course there are managers without accounts as yet, but Access will not let me enforce ref integrity saying that managers may have records not found in accounts.  Of course that's true.  

Can you please help me set this straight.  

And ultimately, I want to ensure that if I have to delete a manager, I can delete all associated accounts at the same time. :Confused:

----------


## skhanal

You have to fix the data before you can enforce the foreign key reference.

----------

