Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Synchronizing two sub forms with a many to many relationship.

Status
Not open for further replies.

ugly

Programmer
Jul 5, 2002
70
0
0
GB
I have created a blank form, I’ve dragged two sub forms onto this, these have a many to many relationship. The two sub forms are shown in data view. I want to synchronize the action of the two sub forms, so that when a selection is made in the first the relevant entries are shown in the second. I tried something similar when I synchronized two tables that had a 1:M relationship, I included a hidden text box within the main form that had a reference to the first sub form and from that I was able to link the child and master field propertities within the second sub form, that worked fine. My question is how do I get this to work for my M:M tables –do I need to include the junction table between them on my main sub form and work through that or is there a quicker way- I don’t want to use wizards since I have more tables to include.
 
I assume this is referring to your other thread, and I thought I explained it there, but I will try to add more detail:

So one design would be:
Main form based on the Drawings table only no need for other tables in the query.

Continuous Subform one based on a query joining junction table one and the unit table linked by unit ID. I assumed this junction table has only drawing IDs and unit IDs. . Now link the subform to the mainform in a normal fashion by drawing ID. To add a new record to this subform the Drawing ID happens automatically because of the subform relationship, and you need a pulldown on the junction table unit field to add a new unit ID in the left side of the query. Also you will put a hidden textbox on the main form that is the unit ID. On the current event of the subform update the hidden field to the value of the unit id.

Continuous subform two based on a query that joins junction table two and the components table joined by component ID. . Link this subform to the hidden field. To update a record in this subform the unit ID will happen automatically because of the subform relationship. The component ID field needs a pulldown to add a new ID to the left side junction table's component ID field.

Also I would keep this as one thread since you have the details in the first thread.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top