I have a question about a query setup.
I have a table called tblPersonality with 16 fields. One of the them is "Personality types". The rest of them are personality indicators which are all yes/no fields. There are altogether 10 records in the table.
I want users to select indicators from a form, then base on their selection, I will report to them what kind of personality thet have. I will say something like "It's possible that you have the following types of personalities: ..."
My problem is that I cannot get the result I want.
Here is how I do it:
I created a user table called tblInput that's linked to the input form. My SQL statement is
select personlity from tblPersonlity where
((tblePersonality.indicator1=Yes)and(tblInput.indicator1=Yes))OR ((tblePersonality.indicator2=Yes)and(tblInput.indicator2=Yes))OR etc all the way to indicator 10. What I got is all of the records. If I change OR to AND, it will be too stringent on users meaning unless they choose all the indicators for a personality they won't get anything.
How should I change it? Thank you.
I have a table called tblPersonality with 16 fields. One of the them is "Personality types". The rest of them are personality indicators which are all yes/no fields. There are altogether 10 records in the table.
I want users to select indicators from a form, then base on their selection, I will report to them what kind of personality thet have. I will say something like "It's possible that you have the following types of personalities: ..."
My problem is that I cannot get the result I want.
Here is how I do it:
I created a user table called tblInput that's linked to the input form. My SQL statement is
select personlity from tblPersonlity where
((tblePersonality.indicator1=Yes)and(tblInput.indicator1=Yes))OR ((tblePersonality.indicator2=Yes)and(tblInput.indicator2=Yes))OR etc all the way to indicator 10. What I got is all of the records. If I change OR to AND, it will be too stringent on users meaning unless they choose all the indicators for a personality they won't get anything.
How should I change it? Thank you.