Can I associate multiple subjects in a list to an Access record?

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

Guest

I am trying to put each record in an Access database into multiple subject
categories. I have created a separate table with the subjects, and created a
pulldown menu for adding subjects to each record. But I can only do one
subject at a time. How can I do a multiple selection of more than one
subject for each record???
 
First of all, combo boxes (the proper name for pulldown lists) do not
support multiselect.

Secondly, you cannot (or should not) store multiple values in a single
field. What you've got is a many-to-many relationship: one record can be
associated with many subjects, and one subject can be associated with many
records. The proper way to handle this is to introduce a third
"intersection" table that contains the Primary Key of both of the other
tables.

In other words, to associate Record 1 with Subjects A and B, you'd insert 2
rows in the intersection table, one saying Record 1, Subject A, and one
saying Record 1, Subject B.

The usual way to create a user interface to accomodate this is to use a form
and subform. Take a look, for instance, at the Orders form in the Northwinds
database that came with Access. There's a many-to-many relationship between
Orders and Products, resolved by the Order Details table.
 

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

Back
Top