I've been looking at how to convert what I have as UNION to INTERSECT, but there is no INTERSECT keyword in MS Access.
I've been very confused as to how the following code would look like using inner join if I wanted the intersection of these two select statements instead of the Union of them.
I know I can achieve what I want if I SELECT DISTINCT and then use inner join but the ON keyword really confuses me.
I just started a week ago with SQL so if you see anything else wrong with the code I'll accept all constructive criticism :)
SELECT *
FROM (SELECT [Catt].[Name]
FROM [Catt]
WHERE ((([Catt].[Name]) Like "*" & [forms]![Main]![SrchText] & "*")
AND [forms]![Main]! [SrchText] IS NOT Null AND [forms]![Main]![SrchText]<>'' )
UNION
SELECT [Catt].[Name]
FROM [Catt]
WHERE ((([Catt].[Category]) Like [forms]![Main]![Combo7].Value) AND (([forms]![Main]! [SrchText] IS Null) OR ([forms]![Main]![SrchText]='')))) AS Query
ORDER BY [Catt].[Name];
Thank you.