vb search problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • charvi
    New Member
    • May 2007
    • 121

    vb search problem

    i have develped a business card softwarewhichco ntans name as one field.In this field thenames are saved like this
    Mr abey
    Dr ashith
    Mr ajith
    now for eg i want to search name starting from aj.if i use the left function
    then in th search text box i have to type Mr aj
    but is there any way to search by just typing aj and i want result should be displayed in datagrid
    thanks in advace
  • pureenhanoi
    New Member
    • Mar 2007
    • 175

    #2
    Originally posted by charvi
    i have develped a business card softwarewhichco ntans name as one field.In this field thenames are saved like this
    Mr abey
    Dr ashith
    Mr ajith
    now for eg i want to search name starting from aj.if i use the left function
    then in th search text box i have to type Mr aj
    but is there any way to search by just typing aj and i want result should be displayed in datagrid
    thanks in advace
    TO do this, you can use function InStr(the source string,the string to search,[toptional]...)
    ex.
    result = InStr("Mr ajith","aj")
    -> result = 4
    result = InStr("Mr ashith","aj")
    -> result = 0

    Comment

    Working...