This is the setup;
Main form based on tblBasic (employee records).
The subform is a Single form based on tblContracts.
The forms are linked on basicID which is the primary key in tblBasic and
Foreign Key in tblContracts.
An employee *may* have more than one contract. The default is that each
employee has at least one contract.
I now realise that once I create an employee record this doesn't mean a
single related record is created in tblContracts as I would like. A record
*is* created in tblContracts but it's just empty and the FK from tblBasic is
not there.
So now I am creating a related record with the FK id using DAO.
However when i click onto the subform it automatically creates another
record (with blank basicID).
How can I stop this, and ensure I only have valid records? Each employee
should only have one Contract record to start with.
(If this can be solved then I think the rest is ok; I have code that creates
another Contract record, if the user so desires, which appears to work
fine.)
many thanks
Martin