No Nulls allowed for FK in Access?

D

Dave

When I specify "Enforce Referential Integrity" on a table relationship in MS
Access 2003 it fails saying that the child table FK cannot be NULL.

SQL Server allows NULL FKs.

Is there any way to enforce referential integrity in MS Access and still
allow NULLs in the FK?
 
P

Pat Hartman\(MVP\)

Foreign keys may be null but primary keys may not. Make sure the pk's are
defined properly for both tables and make sure the relationship is properly
defined. In order for foreign keys to be null, you need to remove the
automatic default of 0 which is what Access assumes when you define a
numeric field. Make sure the required property is set to No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top