many to many

B

Bill H.

I have three tables.

Tbl1 has names (PriKey, firstname, lastname)
Tbl2 has email groups (PriKey, EGroupname)
Tbl3 three has three fields, PriKey, Tbl1PriKey, and Tbl2PriKey, so I can
relate names to email groups.

Now I'm trying to create a form where I have one combo box to select the
email group, and a list box where I can select the names that I want to be
in a particular email group.

Can't seem to get it working. Seems it ought to be simple with just using a
combo box and a subform and no VBA, but it's not. :-(

Suggestions?

Thanks.
 
A

Allen Browne

If you are comfortable with writing code, you could use create an unbound
form wtih a combo (for the group), a multi-select list box (for the
clients), and a command button for adding the clients to the group. The
button's Click event procedure would need to loop through the ItemsSelected
property of the listbox, and AddNew to a Recordset opened into the junction
table (the 3rd one.)

If you want a code-free solution, create a main form for the email group,
with a subform bound to the junction table. In the continuous subform, will
be a combo for selecting a client. You can then enter the next client on the
2nd row of the subform, and so on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top