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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toggling record sources of 2 subforms that must be visible on mainform

Status
Not open for further replies.

accesser2

Technical User
Jan 15, 2004
8
US
Hi there,

I have a form to organize bottles in mind, but am unsure if it will work. Here's some background info:

Mainform = frmProduct, which contains fields for pricing, status, etc. of complete products, which are bottles (new, empty bottles with their caps), as well as an image control for a thumbnail of a complete product (bottle + cap).

The mainform has 2 subforms that MUST be visible AND side-by-side:

sfrmBottle (record source = tblBottles), which contains data on bottle dimensions, name, etc., as well as an image control for a thumbnail of a bottle (without the cap).

sfrmCap (record source = tblCaps), which contains data on bottle cap specs, name, color, etc., as well as an image control for a thumbnail of a cap (without a bottle).

Since many caps can fit 1 bottle, and many bottles can fit 1 cap, there is a many-to-many relationship, so I have 2 main tables (tblBottles and tblCaps) and a join table (jtblProducts).

The mainform's record source would be the join table, jtblProducts, and the subform's record sources would be the other 2 tables. So, before a product can be finalized, the particular bottle + cap combination must be entered into the subforms, and then 'applied' to the final product.

I've seen something similar to this before, but only 1 subform was involved, and the data in the subform's underlying table had to be entered in prior to being applied to the main form's record (The main form's record was the default record until otherwise changed).

The scenario: the catch is that I'd like to be able to toggle the filtering or linking of the subforms with the mainform. This would allow a user to browse through the various bottles and caps in the subforms separately until they find a combination they like, then apply them both to the final product. They then could turn the parent / child linking back on to continue looking through all the existing product combinations on the main form, while having the the corresponding data in the bottles and caps subforms change accordingly.

Would anyone have any ideas how this could be accomplished?

Thanks,

Arnold
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top