data input form for tables with many to many relationship

A

Arnold Klapheck

I am looking for suggestions or tutorials that will help me design form(s)
for simplified data input for the following.

I have a student table and a guardian table; they have a many to many
relationship, so I have a bridge table and two extra fields in the bridge
table that describe the relationship.

Student must be entered first. I have a form that does this.

What I need to do now is enter new guardian information in the guardian
table and the information in the bridge table.

I would like to select a student (possibly using combo box) from the student
table, then enter the two descripters about the relationship (that go into
the bridge table) then enter the info about the guardian in the guardian
table. Ideally I would like to do this on one form.

any suggestions or areas I might look to accomplish this would be appreciated.
 
R

Rui

Ok.
you correctly added a new table to split the many-to-many relationship.
Now, all you have to do is:

1. put a combo box for students (the wizzard should kick in), select 'I want
the combo box to look up the values in a table or query', then select your
students table, next select the field you want to be included in the combo
box, you may skip the sorting if you like, then select hide the key column,
and accept the label suggested.

2. do the same for the guardians combo box.

3. add as many textboxes as needed for the extra bits of info you would like
to put in the 'bridge' table. Make sure you give them meaningful names.

4. add a button and attach a click event to it.

5. in the button you should write something like:

DoCmd.RunSQL "INSERT into [bridge table name] values (" & Me.ComboStudents &
"," & Me.ComboGuardian & ",'" & Me.TextComments & "')"

(be advised that any text fields need to be between quotes, and numeric
fields do not use quotes).

Hope this helps
Rui
 

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

Top