Data entry form

T

Tim

I created a main form (to pull out and display info about a student that are
already in the system such as name and address) and a subform (to get new
student information such as phone and email) for the user to input data.

Now the student needs to be assigned to a teacher. I want to design a new
Form for the user that pulls all stud data from the main/subform above and
assign this stud to a teacher. I plan to create a combo box for the user to
select a teacher from the drop down list. I have a table tblTeacher that has
StudId and TeacherId are primary keys. tblTeacher contains info about
teachers. How can I am able to assign the student to the teacher from the
above scenario?
Thank you for your help in advance
 
L

Linq Adams via AccessMonster.com

From what you've said so far, it makes no sense for you to have more than one
form! Why would you have one form for name and address, a second (sub) forn
for entering phone and email, and yet another form to assign the student's
tracher?
 
T

Tim

As I said, the main form is to display the data already in the table in the
SQL Server database. The user does not have to enter data again. That saves
time and errors. The subform is for more data about a student that are not in
the system yet. Assume I have a main/subform like that, do you know how can I
assign a student to a teacher using teacherID. Thanks
 
B

benyod79 via AccessMonster.com

Since every student needs only one teacher, why don't you add a field to your
student table for TeacherID?

tblTeacher
TeacherID (PK)
TeacherFirstName
TeacherLastName

tblStudent
StudentID (PK)
StudentFirstName
StudentLastName
StudentAddress
StudentPhone...etc
TeacherID (FK to tblTeacherID)

On your main form, create a drop-down with recordsource tblTeacher. Have the
drop-down store the selected TeacherID in TeacherID. This is assuming
tblStudent is your form's record source.
 

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