Results 1 to 2 of 2

Thread: [2005] keyword search

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    [2005] keyword search

    Hello, how would i make my program search for keywords in a textbox?


    Example:

    txtWrite => text box
    lblReply => label

    Code:
    If txtWrite.text = "hello computer how are you?" then
    lblReply.text = "I am fine thankyou for asking."
    End if
    In the above code there is a bit of a problem what if the user types
    "hello how are you?" or "hi computer how are you" it wont work because it must be exact is there a way to do a keyword search inside the textbox.
    Im not good at databases so unless you can explain how to retrieve and store information in one please dont you it ina reply.

  2. #2
    Addicted Member
    Join Date
    Feb 2008
    Location
    California
    Posts
    151

    Re: [2005] keyword search

    You can use Instr(stringVar,valuetosearch)

    returns >0 If match found.
    example:
    If Instr(stringVar,valuetosearch)>0 Then 'means sting found.

Posting Permissions

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



Click Here to Expand Forum to Full Width