I have a db with a table for staff (tblStaff) and a table for incidents (tblIncident) I have a form for creating a new incident. After you create the incident, you can add a staff member(s) that were involved in the incident. What I want is a combobox that has the list of staff in tblStaff but NOT already in the incident. I figured that I need a loin query with a way to link to the Incident table. I have tried some things and am close but not quite there here is a simplified version to get the point accross. I have a function that contains a global variable to indicate what the current incident log number is ( getCurrentIncidentNum() )
SELECT * from tblStaff where tblStaff.id <> tblIncident.StaffId leeft join on tblIncident.incident= getCurrentIncidentNum
I am not sure exactly how to do this query...any ideas?
SELECT * from tblStaff where tblStaff.id <> tblIncident.StaffId leeft join on tblIncident.incident= getCurrentIncidentNum
I am not sure exactly how to do this query...any ideas?