Hello,
I am creating a main form and subform in data-entry view. Main form is about patient's general information (patientId, age, sex etc.) and the subform is about the tests that particular patient is taking. Both forms are related in one to many relationship using the patientID i.e for one patient there can be multiple tests.
My problem is, I want to create both the forms in Data-entry view. So when user wants to enter data, for new patient (whose record is not yet created in the patient table), patient record should be saved in patient table as well as if user entered in data in tests subform, that data should be saved in test table. But in second case, where user wants to enter the tests data for existing patient, I want to save only the data of the test subform and not the data of main form ( which obviously will end up throwing error, as primary key 'patientId' already existing )
Can you please guide me how can I do the selective database update( updating just test table and not the patient table) ?
Please let me know if you need any further details, being newbie to access, I was really unable to solve this problem after spending hours. I highly appreciate your help!
Thanks