Working in Access 2003 with Access 2000 file format.
I'm trying to set up a form with a six-page tab control, three pages of which contain subforms bound to a table that has a 1-to-1 relationship with the parent form's bound table. I've proceeded to relate the tables in this way (which makes the most sense to me for the situation), encouraged by the thread below:
Limit subform to 1 entry
Now, this arrangement generally works all right, but if I come to a record that does not yet have a corresponding record in the related table, and start entering data for it, I run into problems when I go to one of the other pages of the tab control. Trying to enter more data (which ought to go into the same new related record) gives me the 'The changes you requested... would create duplicate values' error.
I gather Access is somehow trying to make a second related record, which it can't because the primary key is equal to the main record's primary key.
No problems occur once the related record has been saved (i.e., I have to start entering some data, move to a different main record and then come back); the code provided by ADezii in the other thread makes sure that the existing related record gets loaded up, for any of the tab control pages.
Another possible symptom is that sometimes I get an error like 'The record contains no data'--a dialog box that pops up three times in a row when closing the main form. I can't recreate it at the moment, and I've never known exactly what conditions cause it, but I'll be watching out.
Is there any way to force the other two pages to go to the newly created record in the related table?