Parameter search in Union query

temple owls

Registered User.
Local time
Today, 00:08
Joined
Feb 28, 2019
Messages
21
I have a union query between two queries. The current SQL is:

SELECT * FROM 2018Query
UNION ALL SELECT * FROM 2019Query;

I'd like to add a parameter search. I had one previously on a non-union query that worked perfectly, but this was in design view and idk how to add this to SQL View. In the criteria cell in the non-union query, I had:

Like "*" & [Search text] & "*"

Please help lol
 
Hi. You can create a new query in design view, add the UNION query instead of a table, drag all the fields and, then add your criteria like you would normally do it. Cheers!
 
Try adding a WHERE clause to each:

SELECT * FROM 2018Query
WHERE FieldName Like...
UNION ALL
SELECT...
 

Users who are viewing this thread

Back
Top Bottom