Re: SQL issue with access
well, you doing a SELECT * FROM so you are returning every column in the table. I would suggest typing the column names that you want the query to return. You'd do something like this.
Code:
Select FNAME, LNAME, ADDRESS1, CITY, STATE, ZIP
FROM customers
That would return only columns fname, lname, address, city, state, zip even though the table contains more than just those columns.
Re: SQL issue with access
That's a difficult query to understand, and that's probably where the problem comes in. There is a problem in that first part. Suppose Text4 = Blue, and the fields are 1, 2, 3, and 4. If field 1 = Blue, then the query will do this:
Field 1 not like Blue? False
OR
Field 2 not like Blue? True
Or
Field 3 not like Blue? True
OR
Field 4 not like Blue? True
The result of all that is False OR True OR True OR True = True. Therefore, the first statement will always evaluate to true for every record where Text4 is not in all four fields. That's not what you want, as it is very unlikely that ANY record will be excluded by that. I believe that you just want to change the OR to AND for the comparisons for Text4.