Robin,
You can try to construct the select statement on the fly, by first parsing the expression you typed to several words and then iterating through fields of the table (.RecordSource), checking if the field is character type and adding it.
E.g. your select statement (in text form) will look like
select * from Customers where (FirstName like 'Robin%' OR LASTName like 'Robin%' OR MiddleName like 'Robin%') and
(FirstName like 'CLAPWORTHY%' OR LASTName like 'CLAPWORTHY%' OR MiddleName like 'CLAPWORTHY%')
>Hi
>
>I've been using an inherited form class that allows me to quickly & easily pass it a few parameters and it constructs an easy to use grid, and of course I've been happily using it for years.
>
>Been asked to add a Text Search option at the bottom of the grid, no problem I thought.
>
>When I dug around inside this class, to my amazement I found the grid it creates has no alias, the control source of some of the columns can be several fields eg Customers.csurname+" "+customers.cfirstname
>
>So i've no table to search through, the grid has no alias, and the grid is not using an array.
>
>How the hell do I go through the grid, looking for my search string text, in particular I want to be able to search for say
>
>CLAPWORTHY ROBIN
>
>in the grid example, this a combination of the two fields above IE CUSTOMERS.SURNAME+" "+CUSTOMERS.FIRSTNAME
>
>Can anyone help?
>
>TIA
>
>Rob
If it's not broken, fix it until it is.
My Blog