selecting certain data

corpusaggie

New member
Local time
Today, 00:29
Joined
Feb 27, 2002
Messages
9
I have a database of students, each paried with an advisor...I want to create a query that will display a certain advisor with all their students, or as default all the advisors and students. I know that part has to do with the criteria in under the advisor field, i just can't get the thing to default to print all of the advisors...please help...
 
How are you selecting the advisor? Combo box, Parameter, Unbound form?

Anyway, your underlying query will have to include both the advisor table and the student table (which I'm presuming has a field for the Advisor's ID/PK). This will allow you to select advisors by a more useful identifier than "#34".
Your criteria should include [AdvisorName] & "*" to default to showing everyone if they leave it blank.

HTH,
David R
 
You need to use a left join between the table that contains advisors and the table that contains students. This will include advisors even if they currently do not have any students assigned to them.
 

Users who are viewing this thread

Back
Top Bottom