A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

many to many



 
 
Thread Tools Display Modes
  #1  
Old November 14th, 2008, 09:36 AM posted to microsoft.public.access.tablesdbdesign
Burt
external usenet poster
 
Posts: 48
Default 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  
Old November 14th, 2008, 10:03 AM posted to microsoft.public.access.tablesdbdesign
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.