VBKid04
04-16-2004, 07:18 PM
Im trying to use a UCase LIKE Search...
This is okay if I only want to search a word/words from one field, but how do I do it if I need to join 2 fields ?
Eg. I have 2 fields CustomerFirstname and CustomerSurname
What happens if the user types into the search "VisualBasic Kid"
where VisualBasic is the CustomerFirstname and Kid is the CustomerSurname ?
It won't find anything...
Maybe someone can take a look at my string and tell me where I'm going wrong...
Select * From Customer Where UCase(CustomerSurname) LIKE
'%" & UCase(txtSearch) & "%' OR (UCase(CustomerFirstname) &
UCase(CustomerSurname)) LIKE '%" & UCase(txtSearch) & "%'", db,
adOpenStatic, adLockOptimistic
Thanks for any help once again
This is okay if I only want to search a word/words from one field, but how do I do it if I need to join 2 fields ?
Eg. I have 2 fields CustomerFirstname and CustomerSurname
What happens if the user types into the search "VisualBasic Kid"
where VisualBasic is the CustomerFirstname and Kid is the CustomerSurname ?
It won't find anything...
Maybe someone can take a look at my string and tell me where I'm going wrong...
Select * From Customer Where UCase(CustomerSurname) LIKE
'%" & UCase(txtSearch) & "%' OR (UCase(CustomerFirstname) &
UCase(CustomerSurname)) LIKE '%" & UCase(txtSearch) & "%'", db,
adOpenStatic, adLockOptimistic
Thanks for any help once again