Access form parameters show id pk in report

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

mterry

Thread Starter
Joined
Jun 13, 2004
Messages
40
I have an Access form for a school database. The form uses parameters defined as unbound text boxes for teacher (pteacher) and classroom (pclassroom). Each of these links back to their own tables: the table Teachers has column teacherid & teacher; table Classrooms has columns classroomid & classroom. I have a report that pulls the data from the query based on the parameters (pteacher and pclassroom) from the form, so I am getting all the data I want. My problem is that on my report, it displays the teacherid and classroomid in my report header rather than the teacher and classroom values.

How do I get my report header to show the values selected for the parameters rather than the primary keys?

This is the control source used in my report and the control source in my form: "=Nz([Forms]![frmLunchDetail]![pTeacher],"All Teachers")"
 

mterry

Thread Starter
Joined
Jun 13, 2004
Messages
40
Yes, my teacher parameter uses an unbound combo box on the form. The control source is "SELECT Teachers.TeacherID, Teachers.Teacher FROM Teachers ORDER BY Teachers.Teacher; "
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Change this
"SELECT Teachers.TeacherID, Teachers.Teacher FROM Teachers ORDER BY Teachers.Teacher; "
To
"SELECT Teachers.Teacher FROM Teachers ORDER BY Teachers.Teacher; "

But you will probably have to change the Report Query to put the Criteria in the Teacher instead of the TeacherID.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top