I think the answer to this will be no....go build a better database but thought I would ask.
I have a database set up with different columns, the majority of them contain a yes/no reply but there are also columns that has data about the same subject but across a few fields, for example, animal1, animal2, animal3.
So I've delved into the access internet world and managed to work out how to make some search's work but on different forms. e.g 1 form that uses AND logic that just searches the yes/no columns and another that uses OR logic that searches over multiple columns using Like "*" & [Forms]![search]![animals] & "*"
The issue is when I want to try and combine the 2 searches onto one query/form the results just don't work. I presume that this is because of adding OR logic it means that when I run the query that its just using or logic?
I know this database is rubbish and it should be set up correctly with names tables and links but this is really just to be used as a proof of concept where if all is happy I can get budget/funding to have someone who knows Access to make it than a total noob!!
Thanks for taking a look, I've got this far from reading forums!
I've put some of the FROM and WHERE text below. I've cut loads out so if there are too many "(" that will be why.
FROM textdata
WHERE (((textdata.[Forms]![Full search]![Full assembly] & "*") AND ((textdata.Component) Like "*" & [Forms]![Full search]![Component] & "*") AND ((textdata.OMR) Like "*" & [Forms]![Full search]![OMR] & "*") AND ((textdata.Notes) Like "*" & [Forms]![Full search]![Keyword] & "*")) OR (((textdata.Accreditations2)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations3)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations4)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations5)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations6)=[Forms]![Full search]![Accred]));
I have a database set up with different columns, the majority of them contain a yes/no reply but there are also columns that has data about the same subject but across a few fields, for example, animal1, animal2, animal3.
So I've delved into the access internet world and managed to work out how to make some search's work but on different forms. e.g 1 form that uses AND logic that just searches the yes/no columns and another that uses OR logic that searches over multiple columns using Like "*" & [Forms]![search]![animals] & "*"
The issue is when I want to try and combine the 2 searches onto one query/form the results just don't work. I presume that this is because of adding OR logic it means that when I run the query that its just using or logic?
I know this database is rubbish and it should be set up correctly with names tables and links but this is really just to be used as a proof of concept where if all is happy I can get budget/funding to have someone who knows Access to make it than a total noob!!
Thanks for taking a look, I've got this far from reading forums!
I've put some of the FROM and WHERE text below. I've cut loads out so if there are too many "(" that will be why.
FROM textdata
WHERE (((textdata.[Forms]![Full search]![Full assembly] & "*") AND ((textdata.Component) Like "*" & [Forms]![Full search]![Component] & "*") AND ((textdata.OMR) Like "*" & [Forms]![Full search]![OMR] & "*") AND ((textdata.Notes) Like "*" & [Forms]![Full search]![Keyword] & "*")) OR (((textdata.Accreditations2)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations3)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations4)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations5)=[Forms]![Full search]![Accred])) OR (((textdata.Accreditations6)=[Forms]![Full search]![Accred]));