fields

M

mike

i have three tables:
tblStudent (list of student names)
tblSubject (list of classes)
tblStudentSubject(list of selected student and subject)

form:
cbo for list of students. when i select a student, the student id #
(primary key) is added to a field in tblStudentSubject, however, I want to
write the actual name to the table. i specified the control source for the
name field in tblStudentSubject as the name but it keeps giving me the
student id# instead?
 
R

Rick Brandt

i have three tables:
tblStudent (list of student names)
tblSubject (list of classes)
tblStudentSubject(list of selected student and subject)

form:
cbo for list of students. when i select a student, the student id #
(primary key) is added to a field in tblStudentSubject, however, I want
to write the actual name to the table. i specified the control source
for the name field in tblStudentSubject as the name but it keeps giving
me the student id# instead?

What is happening now is the normal (and correct) behavior. Why do you
want to change that? If you had no intention of using the ID# as a
foreign key then it should not even exist. Not to mention that student
name is not likely to always be unique.

It is trivial to *display* the name even though the ID is what is stored.
 
M

mike

ok but when i run a report from tblStudentSubject for a list of which
student(s) is signed up for which subject(s) i need the studentName not
his/her id #.

is there a way to tell the report to print the student associated w/ the id #?
 
R

Rick Brandt

ok but when i run a report from tblStudentSubject for a list of which
student(s) is signed up for which subject(s) i need the studentName not
his/her id #.

is there a way to tell the report to print the student associated w/ the
id #?

Don't base the report on the table. Base it on a query that joins both
of the tables and then you can pull the data from both of them.
 
M

mike

It is trivial to *display* the name even though the ID is what is stored.
when i run my report on tblStudentSubject how do i tell it output
studentName instead of studentID?
 
J

John W. Vinson

when i run my report on tblStudentSubject how do i tell it output
studentName instead of studentID?

Don't base the Report on tblStudentSubject. Base it on a QUERY joining
probably all three table - tblSubject to let you display the name of the
subject, tblStudent to let you display the name of the student,
tblStudentSubject to display the relevant information (if any!!) from that
table.
 
M

mike

It is trivial to *display* the name even though the ID is what is stored.

how do i do that? when i create a report from tblStudentSubject I want to
output the studentName instead of studentID.
 
M

mike

sorry for the dulplicate postings, for some reason the replies to this post
only display when i reply???
 

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