You definitely do NOT want the user to enter the PersonKey on any form. What you do want to do is fill the value of the employer form with PersonKey using VBA prior to the save.
One way to do this is have a textbox in the employer form called me.PersonKey(which probably should be invisible), linked to Employer.Personkey.
Then, have the assignment before the save:
Me.PersonKey=<<some value>>.
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
<<some value>> would be, of course, the Personkey from PersonDetails. There are many ways to pass this value to the current screen. But it has to be done explicitly, unless you are using a linked subform, which is another topic.
The other thing here is that your data model seems like it could use some improvement, if i understand correctly how you seem to have things set up. That's also another topic.
I hope this is somewhat helpful to you.
|