Good Afternoon all,
I have a query which returns the results/fields needed for a search query containing 3 fields
Query name QRY_SearchProp
Fields
- [Address_1]
- [Address_2]
- [Postcode]
*Yes I am totally aware calling a table Table1 is bad etiquette, the database is few years old.
So the query works by searching by Address 2 OR the postcode and matches/returns entries which match the text box [SrchText]
Address 1 is the house number, Currently we can't filter by this. so what I am looking to do is:
Address_1 + Address_2 together OR Postcode
However I also need it that if they search by Address_2 (and don't include Address_1 it still returns results.
I hope this makes sense.
I have a query which returns the results/fields needed for a search query containing 3 fields
Query name QRY_SearchProp
Fields
- [Address_1]
- [Address_2]
- [Postcode]
Code:
SELECT Table1.ID, Table1.[Address 1], Table1.[Address 2], Table1.Postcode
FROM Table1
WHERE (((Table1.[Address 2]) Like "*" & forms!Search!SrchText & "*" Or ((Table1.postcode) Like "*" & forms!Search!SrchText & "*")));
So the query works by searching by Address 2 OR the postcode and matches/returns entries which match the text box [SrchText]
Address 1 is the house number, Currently we can't filter by this. so what I am looking to do is:
Address_1 + Address_2 together OR Postcode
However I also need it that if they search by Address_2 (and don't include Address_1 it still returns results.
I hope this makes sense.