How do I assign several categories to one person using a list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've entered several names under a Table called Contacts. I've entered
several titles of groups that people can belong to, in another Table called
Categories. I've created a form, on which I have a list box, which shows all
the categories someone can be a part of. However, I can get it so they can
select more than one category, but the assignment to a category/categories,
doesn't "stick" with the person. When I go to the next person, it shows what
I entered for the last person, and if I change it, it changes the person
previous as well.
 
Cheryl,

For this you will need yet another table to hold the values you want to
assign to each contact. I will need to have the Category or the Category ID
(if you have on) and the contact ID fields.

After selecting multiple choices you will then need to process the list of
selected items, adding each item to the new table.
 
First off make sure that your Contacts table has a primary key field possibly
named something like ContactsID. Then in your Categories table you need a
field with the same datatype as the PK field. This will be the Foriegn Key
field. Link these two tables based on those PK an FK fields in the
Relationship window.

Delete the List box in your current form. In it's place put a subform based
on the Categories table. Might be best to make the subform a continous form.
Access will link the form and subform together.
 
Back
Top