Hi,
I am an admin volunteer in a homeless shelter and I’m in the process of creating an Access system for the office, I just need help with one final bit. Currently there is a table called Outreach, which stores all the records detailing staff encounters with people on the streets. Two of the columns in the table are named Staff_Driver and Staff_Passenger which record who is driving the outreach van and who the passenger is. These two columns are combo boxes which are populated from a table named Staff_Members, which contains all staff member names under the column Staff_Member (along with ID). Any name can appear as driver or passenger in a record, but obviously not in the same record.
What I am trying to get is a query to count how many times a staff name appears in either the Staff_Driver or Staff_Passenger column in a record in the Outreach table which contains a blank field in any of the other columns.
Eg:
Tom Smith 2
Joe Bloggs 3
The furthest I have managed to get is by using the following which returns a list of the staff names for both the Staff_Driver and Staff_Passenger columns which appear in a record that contain a blank field:
SELECT Outreach.[Staff Driver], Outreach.[Staff Passenger]
FROM Outreach
WHERE (((Outreach.Date) Is Null)) OR (((Outreach.Time) Is Null)) OR (((Outreach.Gender) Is Null)) OR (((Outreach.Nationality) Is Null)) OR (((Outreach.Location) Is Null)) OR (((Outreach.Type_of_Support) Is Null)) OR (((Outreach.Comment) Is Null))
GROUP BY Outreach.ID, Outreach.[Staff Driver], Outreach.[Staff Passenger], Outreach.Forename, Outreach.Surname;
Thanks very much,
Paul
I am an admin volunteer in a homeless shelter and I’m in the process of creating an Access system for the office, I just need help with one final bit. Currently there is a table called Outreach, which stores all the records detailing staff encounters with people on the streets. Two of the columns in the table are named Staff_Driver and Staff_Passenger which record who is driving the outreach van and who the passenger is. These two columns are combo boxes which are populated from a table named Staff_Members, which contains all staff member names under the column Staff_Member (along with ID). Any name can appear as driver or passenger in a record, but obviously not in the same record.
What I am trying to get is a query to count how many times a staff name appears in either the Staff_Driver or Staff_Passenger column in a record in the Outreach table which contains a blank field in any of the other columns.
Eg:
Tom Smith 2
Joe Bloggs 3
The furthest I have managed to get is by using the following which returns a list of the staff names for both the Staff_Driver and Staff_Passenger columns which appear in a record that contain a blank field:
SELECT Outreach.[Staff Driver], Outreach.[Staff Passenger]
FROM Outreach
WHERE (((Outreach.Date) Is Null)) OR (((Outreach.Time) Is Null)) OR (((Outreach.Gender) Is Null)) OR (((Outreach.Nationality) Is Null)) OR (((Outreach.Location) Is Null)) OR (((Outreach.Type_of_Support) Is Null)) OR (((Outreach.Comment) Is Null))
GROUP BY Outreach.ID, Outreach.[Staff Driver], Outreach.[Staff Passenger], Outreach.Forename, Outreach.Surname;
Thanks very much,
Paul