[FONT="]I'm creating a database to track products, European directives where compliance is required, and standards used to demonstrate compliance. I've hit a wall where, because of the structure of my tables, I need to create a record in 2 tables simultaneously from one form.
[/FONT]
[FONT="]Long story short, i have 3 tables all joined together through relationships, so when I wish to have a new record created, a new record must be created simultaneously in all 3 tables. [/FONT]
[FONT="]I have DirectiveName sorted out with a bound form so the user can create a new Directive name first. A name must first be created (if it does not exist) because any name can be used on multiple directives.[/FONT]
[FONT="]After the user creates a name, they must add the Directive number from the tblDirectives:[/FONT]
[FONT="]If a directive doesn't exist, a new one must be created in both tblDirectives and tblDirectivesTracker because they are joined with a one to one relationship. There shall only ever be 1 matching record in both tables at any given time. If I try to add a new Directive to tblDirectives, I receive the following error:[/FONT]
[FONT="]So I've created an unbound form where my goal is to have Directives control above create a new record in both of the following tables/fields:[/FONT]
[/FONT]
[FONT="]Does anybody any example databases using an unbound form to create a new record into 2 tables/fields based on the value of a single control? Either through append queries, VBA, or expressions?[/FONT]
[FONT="]If not, does anybody possibly have any guidance for the simplest method to achieve this?[/FONT]
[/FONT]
[FONT="]Long story short, i have 3 tables all joined together through relationships, so when I wish to have a new record created, a new record must be created simultaneously in all 3 tables. [/FONT]
[FONT="]I have DirectiveName sorted out with a bound form so the user can create a new Directive name first. A name must first be created (if it does not exist) because any name can be used on multiple directives.[/FONT]
[FONT="]After the user creates a name, they must add the Directive number from the tblDirectives:[/FONT]
[FONT="]If a directive doesn't exist, a new one must be created in both tblDirectives and tblDirectivesTracker because they are joined with a one to one relationship. There shall only ever be 1 matching record in both tables at any given time. If I try to add a new Directive to tblDirectives, I receive the following error:[/FONT]
[FONT="]So I've created an unbound form where my goal is to have Directives control above create a new record in both of the following tables/fields:[/FONT]
- [FONT="]tblDirectives | Field: Directives[/FONT]
- [FONT="]tblDirectivesTracker | Field: Directives[/FONT]
[/FONT]
[FONT="]Does anybody any example databases using an unbound form to create a new record into 2 tables/fields based on the value of a single control? Either through append queries, VBA, or expressions?[/FONT]
[FONT="]If not, does anybody possibly have any guidance for the simplest method to achieve this?[/FONT]
Last edited: