My database has a few many to many relationships that are resolved with junction tables.
I'm now building the forms. I have no problem on forms making the associations between records via the junction table if both sides of the M:M have records, but I can't figure out how to do the following:
On a form, how do I create a new record in the other table the junction table is attached to?
For example:
tblLocation 1:M tblLocationRequirement M:1 tblRequirement.
Any pointers would be appreciated.
I'm now building the forms. I have no problem on forms making the associations between records via the junction table if both sides of the M:M have records, but I can't figure out how to do the following:
On a form, how do I create a new record in the other table the junction table is attached to?
For example:
tblLocation 1:M tblLocationRequirement M:1 tblRequirement.
- tblLocation - rooms that software can be installed on.
- tblRequirement - a request for an item of software in a room.
- tblLocationRequirement resolves the many to many. Each entry specifies 1 SW requirement to 1 location.
- [done] Specify the item of software required and then select all the rooms it's needed in. The tblLocations data is full populated so it's a matter of just making the associations.
- frmRequirement (specify the software item)
- subformLocationRequirement (with a cbo that lists the records from tblLocation) (specify the multiple rooms it's to go in)
- [This is the one I really need help with] Select the location (frmLocation) and using a subform add a record for every item of software requested for that location. Because the software requirement records aren't yet a entry in tblRequirements I need to create then as well as the associated junction table entries. How do I do that?
- frmLocation
- subformLocationRequirement??? subformRequirement??? I need data in both, and I assume, Requirement first, before the association can be made in LocationRequirement. Do I want a pop-up to enter in a Requirement which then updates the junction table on close? It sounds a bit round-the-houses.