N
NevilleT
I have a design problem with enforcing referential integrity.
- I have 2 tables, tblProjects and tblBenchmarks. Each tblProject record
may have 1 or no tblBenchmarks records. There can only be one tblBenchmarks
record for each tblProject record
- Projects has a PK called ProjectNo.
- Benchmarks has a PK called ProjectNo which is also a foreign key for
tblProject
- I have a join type of "Only include rows where the joined fields from
both tables are equal"
- I have ticked the referential integrity box
When I try to enter a new project record I get an error.
"You cannot add or change a record because a related record is required in
'tblBenchmarks'."
Obviously I don't understand referential integrity properly. What I want to
achieve is to have a project record and the option to later add a single
benchmark (or not add as the case may be).
- I have 2 tables, tblProjects and tblBenchmarks. Each tblProject record
may have 1 or no tblBenchmarks records. There can only be one tblBenchmarks
record for each tblProject record
- Projects has a PK called ProjectNo.
- Benchmarks has a PK called ProjectNo which is also a foreign key for
tblProject
- I have a join type of "Only include rows where the joined fields from
both tables are equal"
- I have ticked the referential integrity box
When I try to enter a new project record I get an error.
"You cannot add or change a record because a related record is required in
'tblBenchmarks'."
Obviously I don't understand referential integrity properly. What I want to
achieve is to have a project record and the option to later add a single
benchmark (or not add as the case may be).