Desciptions don't show on report

upsman

Registered User.
Local time
Today, 13:35
Joined
Jul 22, 2005
Messages
26
I have 3 tables - the 1st contains a classid and class description, the 2nd contains a teacherid and a teacher name, the 3rd contains a studentid and the classid(s) of the classes they attend and the teacherid(s) of those classes.

When I print a report using the 3rd table, only the id fields print because that's what's stored in the table. What I want is the class description that matches the classid and the teacher name that matches the teacherid to print. How do I get Access to "read" the first 2 tables using the id fields from the 3rd table and return the correct description and name to print on the report?

I'm new to Access so I don't know the syntax to get Access to read a file(table) based on keys and return a different field from the table.

I also need to use the studentid from the 3rd table to read a 4th table and retrieve the student name that matches the studentid to print on the report.

Thanks in advance,
Rod
 
upsman said:
I have 3 tables - the 1st contains a classid and class description, the 2nd contains a teacherid and a teacher name, the 3rd contains a studentid and the classid(s) of the classes they attend and the teacherid(s) of those classes.

When I print a report using the 3rd table, only the id fields print because that's what's stored in the table. What I want is the class description that matches the classid and the teacher name that matches the teacherid to print. How do I get Access to "read" the first 2 tables using the id fields from the 3rd table and return the correct description and name to print on the report?

I'm new to Access so I don't know the syntax to get Access to read a file(table) based on keys and return a different field from the table.

I also need to use the studentid from the 3rd table to read a 4th table and retrieve the student name that matches the studentid to print on the report.

Thanks in advance,
Rod


well you have to create queries joining your child tables to its master tables and use that query as your recordsource on your report :)
 
TeacherID is in the wrong table. It should be in the first table or if a class may have more than one teacher, you need a fourth table to relate classes to teachers. In either event, remove the TeacherID from the third table.

To create a query, open the designer, add the tables you want, create joins by drawing lines between the related fields, then select the columns you want. Use the query as the RecordSource for a form or report or in another query.
 

Users who are viewing this thread

Back
Top Bottom