From: Marshall Barton on
WhathaveIdone? wrote:

>On Aug 10, 3:56�pm, Marshall Barton <marshbar...(a)wowway.com> wrote:
>> WhathaveIdone? wrote:
>> >I have some tables, trying to create a normalized many to many
>> >situation. I the the following tables:
>> >tblStates (US States, that is)
>> >tblProducts
>> >ProdStates (to link the two tables together)
>> >The tblStates and tblProducts tables have a many to many relationship.
>> >What is the best way to create a from to be able to select all the
>> >applicable US States that pertain to this product? No. I am not using
>> >a multi select field in my tables as of yet. I was avoiding that
>> >option.
>>
>> The usual way to do that is to have a main form bound to
>> tblProducts and a subform bound to tblProducts with the
>> productid fields linking them together.
>>
>> The subform would have a combo box bound to the state field
>> and use tblStates as its row source.
>>
>
>Now, what I was trying to avoid is a form with 50 checkboxes that are
>tied to the productID. Maybe I shouldn't be avoiding this method at
>all. Any thoughts? Pros vs. Cons?
>I also should mention that selecting a state means that product is NOT
>available there (Its a lot easier than selecting which states it IS
>available in. Usually there are only 10 or less). The results, I want
>to concatenate in my report like AZ, DE, etc
>That listbox idea sounds like it might work. If you do have code on
>that, that would be great. I'm not a pro, but I can read the code at
>least.

You definitely do not want 50 fields bound to check box
controls. That would grosely denormalize the table or
require a lot of code to keep things straight.

Using a combo box (NOT a list box) is much cleaner and
simpler. Take a look at Bob's demo that take it a step
further by eliminating states already selected.

In case you haven't already picked up on it, using a
continuous subform makes it all look like a list of the
selected states.

--
Marsh