Hi everyone,
I am developing a database which amongst other things records contacts and related information. This database is structured so that a person can be an 'Employee', 'User', 'Customer' etc or any combination of those. So I have a Persons table, a Users table, an Employees table and a Customers table all related by Person_ID. Persons can also have multiple tags (such as Electrician, Plumber etc), so this is in a separate table also related by Person_ID.
What I would like is to be able to search in a single textbox, the name (or part of name of a person), or the tag of a person and have the results shown in a subform below (actually multiple subforms - in order to separate it out by category - Customer, User, Employee etc)
I have been able to do this but have run into a problem, when searching by name, I will get multiple results in any one category if they have more than one tag. I think I need to restructure the query significantly. I realise that this might not be specific enough for a definitive answer but I'm just after a pointer in the right direction, if necessary I can provide more details.
Any help is much appreciated,
Thanks, Ken.
I am developing a database which amongst other things records contacts and related information. This database is structured so that a person can be an 'Employee', 'User', 'Customer' etc or any combination of those. So I have a Persons table, a Users table, an Employees table and a Customers table all related by Person_ID. Persons can also have multiple tags (such as Electrician, Plumber etc), so this is in a separate table also related by Person_ID.
What I would like is to be able to search in a single textbox, the name (or part of name of a person), or the tag of a person and have the results shown in a subform below (actually multiple subforms - in order to separate it out by category - Customer, User, Employee etc)
I have been able to do this but have run into a problem, when searching by name, I will get multiple results in any one category if they have more than one tag. I think I need to restructure the query significantly. I realise that this might not be specific enough for a definitive answer but I'm just after a pointer in the right direction, if necessary I can provide more details.
Any help is much appreciated,
Thanks, Ken.
Comment