Hello,
I have a form (ECDataEntry; Main Form) that will populate a Case ID table (Parent Table). CaseID table has a primary key (PK), that is the foreign key (FK) of 3 tables (Child Tables). These 3 tables also have forms that populate them. For instance, one of tables where PK acts as a FK is Inspections that is populated by the form AddInspections
I'd like to create a button on the main form. This button shall save the record when data is entered and make visible the Details of the Main form. The Detail of the Mainform have a button that opens the AddInspection Form and a label that shows the CaseID Number of the record just created.
When this button is clicked I need some code to copy the primary key in the CaseID table to the Inspections Table, to populate the FK field on the Inspection table. This mean that one Case ID may have many inspections records. The Label will also need to change each time a new record is save.
Any help or better way to do this will be appreciate it. Thanks!
I have a form (ECDataEntry; Main Form) that will populate a Case ID table (Parent Table). CaseID table has a primary key (PK), that is the foreign key (FK) of 3 tables (Child Tables). These 3 tables also have forms that populate them. For instance, one of tables where PK acts as a FK is Inspections that is populated by the form AddInspections
I'd like to create a button on the main form. This button shall save the record when data is entered and make visible the Details of the Main form. The Detail of the Mainform have a button that opens the AddInspection Form and a label that shows the CaseID Number of the record just created.
When this button is clicked I need some code to copy the primary key in the CaseID table to the Inspections Table, to populate the FK field on the Inspection table. This mean that one Case ID may have many inspections records. The Label will also need to change each time a new record is save.
Any help or better way to do this will be appreciate it. Thanks!