Hello,
I have two forms that were created to enter data. The main form creates a record in the Parent Table. The second form populates a Child table which have a relationship with the Parent Table. The foreing key in the Child Table is = CaseID and the Primary key in the Parent Table is = CaseID, too.
I would like to add a button in the Main Form that when clicked creates a new record in the Child Table. When the new record is created in the Child Table, I would like to copy the primary key from the Parent Table to the Child Table. It seen that this will allow to enter the data in the Child Table relating it with the Parent Table. On the form that populates the Child table, I would like to add a button that will allow adding more records related the record created in the Parent table. So, in the child table one CaseID number can have many records.
I've tried a lot of VBA coding and for some reason error comes. So, I would like to start from scratch. I am REALLY new on VBA and it seen that this is complicated routine.
I have two forms that were created to enter data. The main form creates a record in the Parent Table. The second form populates a Child table which have a relationship with the Parent Table. The foreing key in the Child Table is = CaseID and the Primary key in the Parent Table is = CaseID, too.
I would like to add a button in the Main Form that when clicked creates a new record in the Child Table. When the new record is created in the Child Table, I would like to copy the primary key from the Parent Table to the Child Table. It seen that this will allow to enter the data in the Child Table relating it with the Parent Table. On the form that populates the Child table, I would like to add a button that will allow adding more records related the record created in the Parent table. So, in the child table one CaseID number can have many records.
I've tried a lot of VBA coding and for some reason error comes. So, I would like to start from scratch. I am REALLY new on VBA and it seen that this is complicated routine.