I have this code:
Code:if prtLastName <> "" then if ubound(split(prtLastName, ",")) > 0 then 'last name, first name search query = query & " AND eofEMPLOYEES.emp_lastName LIKE N'" & ccDB.LIKEify(split(prtLastName, ",")(0)) & "%'" query = query & " AND eofEMPLOYEES.emp_firstName LIKE N'" & ccDB.LIKEify(trim(split(prtLastName, ",")(1))) & "%'" else query = query & " AND (" query = query & " eofEMPLOYEES.emp_lastName LIKE N'" & ccDB.LIKEify(prtLastName) & "%'" query = query & " OR eofEMPLOYEES.emp_firstName LIKE N'" & ccDB.LIKEify(prtLastName) & "%'" query = query & " OR eofEMPLOYEES.emp_emailAddress LIKE N'" & ccDB.LIKEify(prtLastName) & "%'" query = query & " OR dtaPASSWORDS.pwd_password = N'" & ccDB.LIKEify(prtLastName) & "'" query = query & " )" end if end if
The code performs well with the following searches:
1. last name, first name search such as Moore, Roger
2. last name only such as Moore
3. first name only such as Roger
4. email address only such as roger_more@terrific.com
5. password such TGBGGKD
What I need to add in the code where it is capable also to search for firstname lastname such as Roger Moore or it is capable to search like Alberto de Gonzales.
Can you help me guys on this.
Thanks in advance



Reply With Quote
Bookmarks