G
Guest
Hello all,
I have three tables (I am using recipies to make my issue clearer):
tbl_Authors, primary key = AuthorID
tbl_Recipies, primary key = RecipeID
tbl_Favorites, duo primary key = RecipeID & AuthorID
To avoid a many to many relationship between tbl_Authors and tbl_Recipies,
tbl_Favorites is a bridging table.
The parent form is frm_AddAuthor.
The child form is sfm_AddFavorite.
When entering an Author, the parent form generates an AuthorID. The AuthorID
of the current record on the parent form becomes the AuthorID on the child
form. A combo box is used on the child form to select a recipe. The selected
RecipieID becomes the 2nd part of the tbl_Favorites duo primary key. The
problem is, since the parent and child forms are linked on the AuthorID
field, a record starts on the child form as soon as the main form generates
it. If there are no favorites to enter at this time, I would like to simply
close the parent form and have no records entered into the child form. But,
since the record on the child form starts as soon as an AuthorID is
generated, I get a primary key violation if I don't enter a favorite.
I would appreciate any advice.
Thank you,
Renee
I have three tables (I am using recipies to make my issue clearer):
tbl_Authors, primary key = AuthorID
tbl_Recipies, primary key = RecipeID
tbl_Favorites, duo primary key = RecipeID & AuthorID
To avoid a many to many relationship between tbl_Authors and tbl_Recipies,
tbl_Favorites is a bridging table.
The parent form is frm_AddAuthor.
The child form is sfm_AddFavorite.
When entering an Author, the parent form generates an AuthorID. The AuthorID
of the current record on the parent form becomes the AuthorID on the child
form. A combo box is used on the child form to select a recipe. The selected
RecipieID becomes the 2nd part of the tbl_Favorites duo primary key. The
problem is, since the parent and child forms are linked on the AuthorID
field, a record starts on the child form as soon as the main form generates
it. If there are no favorites to enter at this time, I would like to simply
close the parent form and have no records entered into the child form. But,
since the record on the child form starts as soon as an AuthorID is
generated, I get a primary key violation if I don't enter a favorite.
I would appreciate any advice.
Thank you,
Renee