Hello,
my interface has the following options
[ All Records ]
[ Records A ]
[ Records B ]
[ Records C ]
[ Records D ]
...
and a search box:
Search: [__________________]
that filters records inside the selected area. Example:
SELECT * FROM records
WHERE name LIKE 'A%'
ORDER BY name
when user types on the search box "George"
the query will be:
SELECT * FROM records
WHERE name LIKE 'A%' and name like '%George%'
ORDER BY name
---
In my code:
MyQuery1.SQL.Strings[1] := 'WHERE...";
MyQuery1.Open;
---
is this the right way to do it or is there another better trick?
Thanks