I have a MainForm linked to a SubForm (1 to many relationship).
If I go to add a new record in the MainForm and begin entering data in the MainForm everything works properly (The MainForm AutoNumber PK gets generated and the corresponding SubForm FK gets set to the number that was generated).
If I go to add a new record in the MainForm and begin entering data in the SubForm, the MainForm's PK is not autogenerated.
I searched and could not find a good solution to this problem. The only thing I found was people preventing the SubForm from being edited until the MainForm was edited. Is there really no way to edit a SubForm first when creating a new record on the MainForm and have it autogenerate the MainForm ID? It seems like such a pain to require the user to first start editing the MainForm before being allowed to edit the SubForm.
Any help would be greatly appreciated.
If I go to add a new record in the MainForm and begin entering data in the MainForm everything works properly (The MainForm AutoNumber PK gets generated and the corresponding SubForm FK gets set to the number that was generated).
If I go to add a new record in the MainForm and begin entering data in the SubForm, the MainForm's PK is not autogenerated.
I searched and could not find a good solution to this problem. The only thing I found was people preventing the SubForm from being edited until the MainForm was edited. Is there really no way to edit a SubForm first when creating a new record on the MainForm and have it autogenerate the MainForm ID? It seems like such a pain to require the user to first start editing the MainForm before being allowed to edit the SubForm.
Any help would be greatly appreciated.