The error message indicates that the primary key in one of the tables does not contain/has not been assigned a value. It must be the sub_dar, cause dar has an AutoNumber id (unless you didn't register a dar record previous to adding a record in sub_dar). The sub_dar primary key (should) now be composite, including both id and (I believe) the datefield. Both must contain a value (In the database I browsed, the date field in sub_dar did not contain a =Date() as default value (but it did in dar) perhaps you should add it in sub_dar too, to ensure a value in the primary key.
The id field should get the id value from the main form/table automaticly (but do check the link parent/child thingie, where both should be "id".
If the tocID thingie is causing a problem, it would more likely produce a "You cannot add or change a record because a related record is required in table 'dar_toc'"
(You have removed/deleted the original toc field?)
Any questions, report back!
Perhaps also upload the current db again?
Regardig your previous post:
Thank you for the kind words, and again for the stars!
Kind words, hearing that ones suggestions/tips sometimes have provided others with better solutions are among the strongest motivations for doing this. Just this week or last week, somenone said a tip from yours truly helped with something she/he had been struggeling with for 6 months. Reading such, is one of the greater rewards!
Also, both providing suggestions/tips and browsing the forums and faq's are great learning experiences for everyone, and also good motivation. So doing this is also partly egoistic - I'm using time on TT to learn more and become a better programmer, instructor and "tipster".
Further I am of the opinion that contact between members outside these forums, might be a bit tricky, cause I make a living out of working with the Office products (since I do support, "teaching", developing etc via e-mail I think the red words just below the preview and submit buttons might apply, at least to my situation). Using time on TT between assignements to "make my brain tick" (or at least try to), I find rewarding, but I'll continue to keep a very strict separation between billable time/clients and TT (regardless of your intentions with providing your e-mail adress).
Just keep on enjoying Access;-)
And yes - until the tables and relationships are supporting the business rules, forget about forms, queries n'reports;-)
Roy-Vidar