beachcomber
IS-IT--Management
Hi,
I'm having a problem with my query below. Basically,
I have 3 user entered parameters that I'm trying to work
into the query. The second and third parameters are an or condition. For some reason, this query keeps returning all records in the system. Does anyone see anything I'm doing wrong?
"Select * From Customers where Customers.LastName Like " & "'%" & txtLastName & "%'" & "and Customers.FirstName like " & "'%" & txtFirstName & "%'" & "or Customers.Address1 like " & "'%" & txtAddress1 & "%'"
Thanks,
Beachcomber
I'm having a problem with my query below. Basically,
I have 3 user entered parameters that I'm trying to work
into the query. The second and third parameters are an or condition. For some reason, this query keeps returning all records in the system. Does anyone see anything I'm doing wrong?
"Select * From Customers where Customers.LastName Like " & "'%" & txtLastName & "%'" & "and Customers.FirstName like " & "'%" & txtFirstName & "%'" & "or Customers.Address1 like " & "'%" & txtAddress1 & "%'"
Thanks,
Beachcomber