Hello Everyone -
I'm hoping to get some expert help on an issue I've been trying to resolve all weekend.
Set Up
To make things simple here is a quick list of how I'm setup using an example of how I've approached the design.
Purpose
I want to interactively build the association between two tables when a checkbox is selected in the subform. In the Main form, the listbox switches between parent records and the SubForm, should show all records from the Child table with those associated records to a parent and those that are not associated yet.
Table/Form Design
Everything above works as it should. For example, when I initially launch the form, I see Parent1 in the ListBox and Child1, Child2 in the subform datasheet view.
Issue
What I would like to do is show all the possible records in the subform datasheet view whether there is an associated record or not. Hence, for Parent1, the subform should show:
I understand that since I don't already have the records associated in the join table that that may be my issue, but I don't want to create "ghost" records in the join table if I don't necessarily have too.
Finally, once a user checks those Child records that haven't been selected, the join table will get updated with the associated records accordingly.
Any suggestions on some alternative approaches would be greatly appreciated?
Michael Lee
I'm hoping to get some expert help on an issue I've been trying to resolve all weekend.
Set Up
To make things simple here is a quick list of how I'm setup using an example of how I've approached the design.
Purpose
I want to interactively build the association between two tables when a checkbox is selected in the subform. In the Main form, the listbox switches between parent records and the SubForm, should show all records from the Child table with those associated records to a parent and those that are not associated yet.
Table/Form Design
- Parent Table (ID, Column)
- 1, Parent1
- 2, Parent2
- Child Table (ID, Column)
- 1, Child1
- 2, Child2
- 3, Child3
- 4, Child4
- Join Table (ParentID, ChildID, Column)
- 1, 1, Yes
- 1, 2, Yes
- 2, 3, Yes
- 2, 4, Yes
- Main Form
- Parent ListBox - shows one parent
- Child SubForm (DataSheet View) - shows associated child records
Everything above works as it should. For example, when I initially launch the form, I see Parent1 in the ListBox and Child1, Child2 in the subform datasheet view.
Issue
What I would like to do is show all the possible records in the subform datasheet view whether there is an associated record or not. Hence, for Parent1, the subform should show:
- Child1, Yes
- Child2, Yes
- Child3, No
- Child4, No
I understand that since I don't already have the records associated in the join table that that may be my issue, but I don't want to create "ghost" records in the join table if I don't necessarily have too.
Finally, once a user checks those Child records that haven't been selected, the join table will get updated with the associated records accordingly.
Any suggestions on some alternative approaches would be greatly appreciated?
Michael Lee