If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
many to many
Hi,
I want to create a database that list researchers and their asscociated subjects (can be more than one). I guess the design would be in the shape of a many to many relationship. 1 table for researchers, 1 table for subjects and a junction table to bring them both together. My question is, how do I create a form that allows my to look at a particular researcher and choose the different subjects that he/she is associated with, maybe as an option group? Many thanks |
#2
|
|||
|
|||
many to many
hi Burt,
Burt wrote: My question is, how do I create a form that allows my to look at a particular researcher and choose the different subjects that he/she is associated with, maybe as an option group? You need to manipulate the junction table. To display the the subjects per researcher you need a main form based on your researchers table. For the subjects you need a view which joins the junction table with the subject table. This view is displayed in the sub form which is connected to the main form via the junction tables researcher value. I would now use to buttons Add Subject and Delete Subject. Add Subject opens a dialog for selecting a subject. After you have the selected subjects ID you insert it into the junction table with the researchers id. The delete button simply deletes the researcher/subject pair from the junction table. Hope that helps. mfG -- stefan -- |
Thread Tools | |
Display Modes | |
|
|