Linking 2 forms

Joined
Aug 14, 2005
Messages
3
Reaction score
0
I have 2 forms - 'Existing Instructor' and 'New 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 'New Course' form has 3 fields - InstructorID, CourseID, Course Name. If a user on the 'Existing Instructor' form clicks a button 'Add New Course'(named Command11), it should open the 'New Course' form, displaying the corresponding InstructorID but the other 2 fields should remain blank. When the user enters information for CourseID & Course Name, and click a button 'Add Course' on the form, the CourseID & Course Name are inserted into another table 'Course'. The 'Instructor' table has a one-to-many relationship with the 'Course' table.

Here's my problem. I have an idea of how to synchronize 2 forms' data but I don't know how to fill only the 'InstructorID' field on the 'New Course' form and leave all other fields blank and ready for data entry. It's important that the InstructorID value in this form matches the InstructorID value of the previous form 'Existing Instructor'. Right now, when i click on the 'Add New Course' button on the 'Existing Instructor' form, it opens the
'New Course' form with all the fields blank. I can manually enter the values for InstructorID, CourseID & Course Name, and click button 'Add Course' to add the data to the 'Course' table but I want the 'InstructorID' to be generated automatically. Please help.

Shal
 

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