S
Shaldaman
I have 2 forms - 'Existing Instructor' and 'Existing Course' which are
linked. The first form has the following fields - InstructorID,
Instructor First Name, Instructor Lase Name and Department, all of
which get populated when the form loads - the information for all the
fields is retrieved from an 'Instructor' table. The 'Existing Course'
form has 4 fields - InstructorID, CourseNumber(a Combobox), Course Name
and Course Description. If a user on the 'Existing Instructor' form
clicks a button 'View Existing Courses'(named Command11), it opens the
'Existing Course' form, displaying the corresponding InstructorID but
the other fields should remain blank. When the user enters clicks on
the CourseNumber combobox to view the drop down list, only CourseNumber
related to that specific InstructorID should be retrieved from a
'Course' table. When a CourseID is selected, the corresponding Course
Name and Course Description should populate the remaining text fields.
The 'Instructor' table has a one-to-many relationship with the 'Course'
table (InstructorID is the primary key in the first table and the
foreign key in the second).
Here's my problem:
1)My combobox pulls up all the CourseNumber records in the Course table
and not just the ones corresponding to the InstructorID
2)When I select a value from the combobox, how do i get the remaining 2
fields Course Name and Course Description to get populated accordingly?
Any help would be appreciated. Thanks in advance.
linked. The first form has the following fields - InstructorID,
Instructor First Name, Instructor Lase Name and Department, all of
which get populated when the form loads - the information for all the
fields is retrieved from an 'Instructor' table. The 'Existing Course'
form has 4 fields - InstructorID, CourseNumber(a Combobox), Course Name
and Course Description. If a user on the 'Existing Instructor' form
clicks a button 'View Existing Courses'(named Command11), it opens the
'Existing Course' form, displaying the corresponding InstructorID but
the other fields should remain blank. When the user enters clicks on
the CourseNumber combobox to view the drop down list, only CourseNumber
related to that specific InstructorID should be retrieved from a
'Course' table. When a CourseID is selected, the corresponding Course
Name and Course Description should populate the remaining text fields.
The 'Instructor' table has a one-to-many relationship with the 'Course'
table (InstructorID is the primary key in the first table and the
foreign key in the second).
Here's my problem:
1)My combobox pulls up all the CourseNumber records in the Course table
and not just the ones corresponding to the InstructorID
2)When I select a value from the combobox, how do i get the remaining 2
fields Course Name and Course Description to get populated accordingly?
Any help would be appreciated. Thanks in advance.