How do I do this??

R

Ron

OK Say I have a table called COURSESECTIONS that lists schedule
numbers of courses and also facultyID's. I then have a form called
FACULTY. On this form, I want to display the courses that the current
faculty member teaches.

So lets say I have a table coursesections with the following info:
COURSEID FACULTYID
===================
999122333 225510
999144441 225510
999555551 228845

so when I open up Faculty form I want to display both 999122333 and
999144441
now those 999 numbers correspond to a table called Courses and the
999122333 for example is actually called MATH 1 and the other 999144441
is called PSY2

so on the faculty form I want to display MATH1 and PSY2 - how do I do
this?
 
S

Svetlana

You can use DLookup function for the control source of an unbound
textbox as like
=DLookup("Course"; "Courses"; "COURSEID =" & Forms! FACULTY!COURSEID )
 
M

Marshall Barton

Ron said:
OK Say I have a table called COURSESECTIONS that lists schedule
numbers of courses and also facultyID's. I then have a form called
FACULTY. On this form, I want to display the courses that the current
faculty member teaches.

So lets say I have a table coursesections with the following info:
COURSEID FACULTYID
===================
999122333 225510
999144441 225510
999555551 228845

so when I open up Faculty form I want to display both 999122333 and
999144441
now those 999 numbers correspond to a table called Courses and the
999122333 for example is actually called MATH 1 and the other 999144441
is called PSY2

so on the faculty form I want to display MATH1 and PSY2 - how do I do
this?


The common way to deal with this kind of many to many
relationship is to have the main form bound to the faculty
table and a subform bound to the junction table,
CourseSections. The subform uses a combo box with its Row
Source set to the Courses table with its BoundColumn
corresponding to the CourseID and the course name as its
visible column. The subform control's Link Master/Child
properties would be set to the FacultyID field.
 

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