B
Bekie
Hello,
I have a database that holds school information including
who to contact at the school. Some schools have several
types of contacts (Primary, Payroll, Grants, etc), but
some only have one primary contact. I want to create a
query (to run a grants report) that displays the grant
contact name if they have one, but defaults to the
primary contact name if they do not have a specific
grants contact. Is there a way to do this? This is my
query code so far:
SELECT School.School_Name, Contacts.Contact_Name,
School.Phone, Contacts.Cell_Phone,
Contacts.Email_Address, School.Estimated_Enrollment
FROM School, Contacts, School_Contact
WHERE (((School.School_Name)=School_Contact.School_Name
And (School.School_Name)=[Enter School Name]) And
((School_Contact.Contact_Name)=Contacts.Contact_Name));
When I put "AND Contact_Type = 'Grants'" into the WHERE
statement it returned no results if there was no grant
contact listed.
Thanks so much!
I have a database that holds school information including
who to contact at the school. Some schools have several
types of contacts (Primary, Payroll, Grants, etc), but
some only have one primary contact. I want to create a
query (to run a grants report) that displays the grant
contact name if they have one, but defaults to the
primary contact name if they do not have a specific
grants contact. Is there a way to do this? This is my
query code so far:
SELECT School.School_Name, Contacts.Contact_Name,
School.Phone, Contacts.Cell_Phone,
Contacts.Email_Address, School.Estimated_Enrollment
FROM School, Contacts, School_Contact
WHERE (((School.School_Name)=School_Contact.School_Name
And (School.School_Name)=[Enter School Name]) And
((School_Contact.Contact_Name)=Contacts.Contact_Name));
When I put "AND Contact_Type = 'Grants'" into the WHERE
statement it returned no results if there was no grant
contact listed.
Thanks so much!