Sorry Ben - probably not explained it too well - I am passing various text strings into an SQL statement...
lcSurname = "customers.cu_surname = '" + alltrim(.txt_13.value) + "'"
SELECT Customers.* FROM gen_data!customers WHERE &lcSurname AND &lcAge AND &lcPostCode AND &lcDate AND lcDepartment into cursor temp
One of the strings is lcDepartment and is several hundred characters long - something like..
lcDepartment = "customers.cu_depta = .t. AND customers.cu_depta = .f. AND customers.cu_deptb = .t. AND customers.deptb = .f." etc etc
Each record has 9 logical fields which are departments - I need to return all the records regardless of department being true or false - but I have to supply something to my SQL statement...
Hope it makes sense???