Results 1 to 1 of 1

Thread: Help me with this search condition pls.

  1. #1
    Join Date
    Jun 2005
    Posts
    6

    Red face Help me with this search condition pls in MS-ACCESS db

    Hai,
    I have an on-line shopping complex project. I want the search button there. For this, i want to do the exact-word search. May anyone help with this pls, this is very very urgent, pls. My database is MS-Access latest version, so "*" is not working in the search query.

    I've four columns namely details, description, descriptionlong, SKU.
    I'm searching my word from these four columns.


    My Query is

    tmpSQL1 = "(a.details LIKE "
    tmpSQL2 = "(a.description LIKE "
    tmpSQL3 = "(a.descriptionLong LIKE "
    tmpSQL4 = "(a.SKU LIKE "

    for i = 0 to Ubound(searchArr)
    if i = Ubound(searchArr) then
    tmpSQL1 = tmpSQL1 & "'%" & validSQL(searchArr(i),"A") & "%')"
    tmpSQL2 = tmpSQL2 & "'%" & validSQL(searchArr(i),"A") & "%')"
    tmpSQL3 = tmpSQL3 & "'%" & validSQL(searchArr(i),"A") & "%')"
    tmpSQL4 = tmpSQL4 & "'%" & validSQL(searchArr(i),"A") & "%')"
    else
    tmpSQL1 = tmpSQL1 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.details LIKE "
    tmpSQL2 = tmpSQL2 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.description LIKE "
    tmpSQL3 = tmpSQL3 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.descriptionLong LIKE "
    tmpSQL4 = tmpSQL4 & "'%" & validSQL(searchArr(i),"A") & "%' " & strSearchType & " a.SKU LIKE "
    end if
    next



    If u want some more details, i had sent an attachment text file, please look into it. Will anyone help me on this pls.
    Attached Files Attached Files
    Last edited by suv; 06-15-2005 at 02:28 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •