I am prototyping something and have a very simple database. I have two tables that are related in a one-to-one relationship by a single key. I have built two queries and I have built two forms. Form1 is tied to Query1 and Form2 is tied to Query2. I have a "Next" button on Form1 which basically closes Form1, opens Form2, and filters Form2 according to Form1.
On data entry, the primary key is an Autonumber field which is gets automatically generated. I don't want the user to have to manually type in this value on Form2 so before Form2 is opened, I want to set the value of the Primary Key to be the same as the Autonumber key that was generated on Form1 (this is the one-to-one key). In my code, how can I say Form2.MyID = Form1.MyID?