Unanswered: Synchronize a main form with a linked form
I am trying to synchronize two forms. A main form and a secondary form with related data. I don't want the secondary form to be a sub-form because not every record in the main form will have relevant data to be input in the secondary form; example,
patient 1 suffers from condition A
patient 2 suffers from condition A and B
Patient 1 data is input into the main form but not the secondary form
patient 2 data is input into main form and additional info into secondary form
The forms are linked through a regular PK and FK relationship. PK from main form is FK for secondary form.
I created a button that opens the secondary form from the main form but what happens is that the secondary form only synchronizes with records that are already present in the main form.
How can I have the secondary form pick up the PK number from the main form, for patient 2. In other words if there is no secondary data as in the case for patient 1 no record is created because the secondary form is not opened; but if there is additional data the form is opened and that record gets stamped with the current PK ID # from the main form.
I know nothing about programming so can this be done with macros or setting form attributes. Thanks very much for any help given.
Look at "DemoFormFormA2000.mdb" (attachment, zip).
Look at Tables, Relationships, Forms (VBA), Module.
In "Table2" (FormB) there are 3 records
for f1ID=10 and f2= "AA" (Table1), and 2 records
for f1ID=11 and f2= "AA" (Table1).