How can I connect two forms together

CSCS

Registered User.
Local time
Today, 09:09
Joined
Jan 10, 2004
Messages
91
Hi all,

I'm designing a db in which I have a list of teacher names, and for each record (each teacher), there is a list of subject that this teacher teaches.

what i did is the following:

I have designed a form with teacher name, and a form for subjects.

I have added a button in the teacher form, next to each teacher name, this button we take the user to the subjects form to add the subjects for this particular teacher.

To link these to form, I have added the primary key of the teacher table (TeacherID) in the subjects table, so the relationship is one-to-many.
but I couldn't get to connect them.

I want the subject form to get the TeacherID from the teacher form to connect each teacher with his subjects. How can I do that?

Any help will be very much appreciated.

Best Regards,
CS.
 
Normally you display 1-M relatoinships with a Form for the 1 side and a SubForm for the Many side.
 
That's what I did.

I want to carry the Primary Key of the main form to the subform by clicking on a button.
 
If you set up the Link Child/Master Fields properly then Access does that for you.
 

Users who are viewing this thread

Back
Top Bottom